Skip to content

ci: Keep Copr RPMs installed when resolving test dependencies - #3103

Merged
evan-goode merged 1 commit into
rpm-software-management:mainfrom
LUX-ETVERITAS:fix/ci-keep-pr-rpms-in-test-container
Dec 4, 2026
Merged

evan-goode merged 1 commit into
rpm-software-management:mainfrom
LUX-ETVERITAS:fix/ci-keep-pr-rpms-in-test-container

Conversation

@LUX-ETVERITAS

Copy link
Copy Markdown
Contributor

Keep the Copr RPMs selected for an integration test installed while resolving the test suite's build requirements.

In the Fedora ELN run for #3079, the container installed the PR's dnf5-plugin-automatic from commit 04dac52e. The subsequent dnf5 builddep transaction replaced it with nightly 858afae0 before the mail delivery tests ran.

Add versionlocks for the installed Copr RPMs after local RPM overrides have been applied and before running builddep. Disable available repositories for the versionlock lookup so a Copr version already replaced by a local RPM does not get an additional lock.

Tested the Dockerfile's DNF commands in isolated installroots with two local repositories. The original transaction upgraded the installed package from version 1 to version 2. With the fix it kept version 1 and installed the other build requirement. A local RPM override stayed at version 2, and a build without Copr inputs continued to upgrade normally.

Lock the installed Copr package versions before builddep can upgrade them
to nightly builds. Look up only installed packages after applying local
RPM overrides so those overrides retain precedence.
@LUX-ETVERITAS
LUX-ETVERITAS requested a review from a team as a code owner December 4, 2026 06:14
@LUX-ETVERITAS
LUX-ETVERITAS requested review from evan-goode and removed request for a team December 4, 2026 06:14
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

ci: Keep Copr RPMs installed when resolving test dependencies

🐞 Bug fix 🕐 Less than 10 minutes


AI Description

• Versionlocks installed Copr RPMs so dnf5 builddep cannot replace them with nightly builds.
• Runs the lock after local RPM overrides, so overrides keep precedence over Copr versions.
• Disables repositories during the lookup, so only installed packages get locked.
Merge Risk 🟢 Low

Blast radius 🟢 Low 💥 0 capabilities

  • No production behavior changes identified.
Behavioral complexity 🟢 Low 🧩 Assessed behavior

  • No production behavior changes identified.
Potential damage 🟢 Low 🩹 Assessed behavior

  • No production behavior changes identified.
Assessed commit 108f093
Diagram

graph TD
  A["Copr RPM install"] --> B["Local RPM overrides"] --> C["versionlock add"] --> D["dnf5 builddep"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Pin the Copr NEVRAs explicitly in builddep
  • ➕ No dependency on the versionlock plugin
  • ➕ Pins exact versions in the command itself
  • ➖ Requires NEVRA strings, which are harder to build from the names in COPR_RPMS
  • ➖ Does not stop later steps from upgrading the packages
2. Exclude the Copr package names from builddep
  • ➕ Simple to express with --exclude
  • ➕ No lock state left behind in the image
  • ➖ Excluded packages may leave unmet dependencies that builddep then fails on
  • ➖ Does not stop later upgrades either

Recommendation: The versionlock approach fits best. It keeps the installed Copr versions across the whole build, and the --disable-repo='*' lookup means only installed packages are locked. Confirm that the versionlock plugin is present in the base image, and that failure to lock a package (for example, one replaced by a local RPM under a different name) is acceptable, since it fails the build.

Files changed (1) +5 / -0

Bug fix (1) +5 / -0
Dockerfile.integration-testsVersionlock installed Copr RPMs before builddep +5/-0

Versionlock installed Copr RPMs before builddep

• Adds a conditional step before the builddep RUN. When both COPR and COPR_RPMS are set, it runs 'dnf5 --disable-repo='*' versionlock add' on the Copr package names. This keeps the installed PR versions from being upgraded to nightly builds during builddep, and leaves builds without Copr inputs unchanged.

integration-tests/Dockerfile.integration-tests

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Great, no issues found!

Qodo reviewed your code and found no material issues that require review
Tip of the day
💡 Did you know, you can import rules and skills only from the repositories your team follows

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗


Powered by Qodo

@evan-goode evan-goode left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, we already use versionlock for the cmdline RPMs above. Thanks!

@evan-goode
evan-goode added this pull request to the merge queue Dec 4, 2026
Merged via the queue into rpm-software-management:main with commit 8f084a0 Dec 4, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants