fix(oci): account for OCA and pqrpm GPG key dbs - #602
Merged
Conversation
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The
release = version.parse(host.system_info.release)logic is duplicated across tests; consider centralizing release parsing or using a helper to avoid repetition and reduce the chance of inconsistencies. - The conditional branches in
test_number_gpg_keysare becoming complex and cloud/distribution-specific; consider extracting the key-count logic into a small helper function to make the test easier to read and to update when new combinations are added. - The hard-coded key counts (e.g., 2 and 5) and paths (e.g.,
/usr/lib/pqrpm/lib/sysimage/rpm) are encoded as literals; consider defining them as named constants to clarify their meaning and make future adjustments simpler.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `release = version.parse(host.system_info.release)` logic is duplicated across tests; consider centralizing release parsing or using a helper to avoid repetition and reduce the chance of inconsistencies.
- The conditional branches in `test_number_gpg_keys` are becoming complex and cloud/distribution-specific; consider extracting the key-count logic into a small helper function to make the test easier to read and to update when new combinations are added.
- The hard-coded key counts (e.g., 2 and 5) and paths (e.g., `/usr/lib/pqrpm/lib/sysimage/rpm`) are encoded as literals; consider defining them as named constants to clarify their meaning and make future adjustments simpler.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
sshmulev
reviewed
Aug 20, 2026
sshmulev
reviewed
Aug 20, 2026
src-up
force-pushed
the
test-number-gpg-keys
branch
from
August 20, 2026 10:41
404f72e to
7777db1
Compare
src-up
force-pushed
the
test-number-gpg-keys
branch
from
August 20, 2026 21:04
7777db1 to
9d686da
Compare
Collaborator
Author
|
@F-X64 do these changes look OK to you |
src-up
force-pushed
the
test-number-gpg-keys
branch
from
August 21, 2026 17:41
9d686da to
319671d
Compare
Collaborator
F-X64
approved these changes
Aug 24, 2026
CIV counted only gpg-pubkey in the default rpmdb and expected 3 keys on all RHEL 9+. Not sure where that number 3 is from. On OCI, Oracle Cloud Agent imports 2 Oracle Linux keys at first boot. - On RHEL 9.7+ the Red Hat keys are imported by pqrpm into /usr/lib/pqrpm/lib/sysimage/rpm, so the default db only has the OCA keys. - RHEL 10 keeps Red Hat keys in the default db (3 RH + 2 OCA). So Expect 2 in the default db on OCI 9.7–9.x, 5 on OCI 10, and add test_pqrpm_gpg_keys for the 2 Red Hat keys in the pqrpm db. Other clouds are unchanged.
src-up
force-pushed
the
test-number-gpg-keys
branch
from
August 24, 2026 14:31
319671d to
10e9e5b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CIV counted only gpg-pubkey in the default rpmdb and expected 3 keys on all RHEL 9+. Still not sure where that number 3 is from.
On OCI, Oracle Cloud Agent imports 2 Oracle Linux keys at first boot.
So Expect 2 in the default db on OCI 9.7–9.x, 5 on OCI 10, and add test_pqrpm_gpg_keys for the 2 Red Hat keys in the pqrpm db. Other clouds are unchanged.