fix: follow-up enhancements for AlmaLinux available_fix#5600
fix: follow-up enhancements for AlmaLinux available_fix#5600
Conversation
fe6af89 to
24b78e6
Compare
There was a problem hiding this comment.
Pull request overview
This PR improves the AlmaLinux available_fix reporting by collapsing duplicate fixed-package entries that differ only by architecture, and adds an online integration test to validate the AlmaLinux errata API integration over time.
Changes:
- Deduplicate AlmaLinux advisory packages by
(name, version, release)during errata processing to avoid repeated output lines per architecture. - Add an external (online) AlmaLinux available-fix integration test using a known CVE.
- Fix minor repo hygiene items (newline at EOF for spelling expectations; replace legacy logger formatting).
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
test/test_available_fix.py |
Adds a long/online AlmaLinux integration test and corresponding mock CVE input data. |
cve_bin_tool/available_fix/alma_cve_tracker.py |
Deduplicates fixed package entries across architectures and modernizes a warning log format. |
.github/actions/spelling/expect.txt |
Ensures the file ends with a newline (spelling action expectation file). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@alex-ter @ffontaine The online test is failing in CI due to |
You'll need to update the respective |
e7a4660 to
8fa80e5
Compare
|
@alex-ter Ready for review. |
alex-ter
left a comment
There was a problem hiding this comment.
Overall LGTM, just a couple of minor tweaks.
Signed-off-by: Vishwajeet Singh <mit.vs.krishna@gmail.com>
8fa80e5 to
c1cccda
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
|
@alex-ter Done. Simplified the dedup logic and added multi-arch entries to |
|
@ffontaine, I think this is ready to merge now: looks good and tests are passing. I can now merge it myself (thanks Terri for inviting me!), but as this would be the first use of my newly acquired powers, let me pause for any comments from you as a precaution. |
|
Thanks for the review, @alex-ter! |
That's great if you can now merge PR, please go ahead, no comments on my side. |
Fixes #5597
This PR addresses the follow-up items identified after merging the AlmaLinux available_fix feature.
The main change is deduplicating packages across architectures in the errata processing. Previously, when AlmaLinux published fixes for multiple architectures (x86_64, aarch64, s390x, etc.), each architecture variant appeared as a separate line in the output. Now packages differing only by architecture are collapsed into a single entry, making the output cleaner and easier to read.
An online integration test has been added to verify the AlmaLinux errata API integration works correctly. The test uses a known CVE (CVE-2022-1271 in xz) that has been fixed in AlmaLinux 9, ensuring the logic doesn't get out of sync with the actual data provided by the server over time.
Two minor fixes are also included: adding the missing newline at the end of
spelling/expect.txtto resolve the spelling check warning, and converting a legacy%sstring format to an f-string for consistency with the rest of the codebase.All unit tests pass, and manual end-to-end testing with
curl-7.76.1-29.el9_4.1.x86_64.rpmconfirms the deduplication works as expected.