Skip to content

fix: follow-up enhancements for AlmaLinux available_fix#5600

Merged
alex-ter merged 3 commits intoossf:mainfrom
VanitasCodes:fix/alma-followup
Mar 29, 2026
Merged

fix: follow-up enhancements for AlmaLinux available_fix#5600
alex-ter merged 3 commits intoossf:mainfrom
VanitasCodes:fix/alma-followup

Conversation

@VanitasCodes
Copy link
Copy Markdown
Contributor

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.txt to resolve the spelling check warning, and converting a legacy %s string 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.rpm confirms the deduplication works as expected.

A

Copilot AI review requested due to automatic review settings March 8, 2026 20:00
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread test/test_available_fix.py
Comment thread test/test_available_fix.py
@VanitasCodes
Copy link
Copy Markdown
Contributor Author

@alex-ter @ffontaine The online test is failing in CI due to errata.almalinux.org being unreachable from the GitHub Actions runner (connection refused). The test passes locally. Is AlmaLinux's domain blocked in CI, or should I add retry/skip logic for network failures?

@alex-ter
Copy link
Copy Markdown
Collaborator

alex-ter commented Mar 8, 2026

@alex-ter @ffontaine The online test is failing in CI due to errata.almalinux.org being unreachable from the GitHub Actions runner (connection refused). The test passes locally. Is AlmaLinux's domain blocked in CI, or should I add retry/skip logic for network failures?

You'll need to update the respective allowed-endpoints list(s) in .github/workflows/testing.yml.

@VanitasCodes VanitasCodes force-pushed the fix/alma-followup branch 4 times, most recently from e7a4660 to 8fa80e5 Compare March 8, 2026 21:33
@VanitasCodes
Copy link
Copy Markdown
Contributor Author

@alex-ter Ready for review.

Copy link
Copy Markdown
Collaborator

@alex-ter alex-ter left a comment

Choose a reason for hiding this comment

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

Overall LGTM, just a couple of minor tweaks.

Comment thread cve_bin_tool/available_fix/alma_cve_tracker.py Outdated
Comment thread test/test_available_fix.py
Comment thread test/test_available_fix.py
Signed-off-by: Vishwajeet Singh <mit.vs.krishna@gmail.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@VanitasCodes
Copy link
Copy Markdown
Contributor Author

@alex-ter Done. Simplified the dedup logic and added multi-arch entries to MOCK_ALMA_API.

Copy link
Copy Markdown
Collaborator

@alex-ter alex-ter left a comment

Choose a reason for hiding this comment

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

LGTM now.

@alex-ter
Copy link
Copy Markdown
Collaborator

@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.

@VanitasCodes
Copy link
Copy Markdown
Contributor Author

Thanks for the review, @alex-ter!

@ffontaine
Copy link
Copy Markdown
Collaborator

@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.

That's great if you can now merge PR, please go ahead, no comments on my side.

@alex-ter alex-ter merged commit 329158a into ossf:main Mar 29, 2026
24 checks passed
@VanitasCodes VanitasCodes deleted the fix/alma-followup branch April 13, 2026 21:36
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.

fix: Follow-up enhancements and minor fixes for AlmaLinux available_fix logic

4 participants