Skip to content

Align package product_name with the major-stream product label - #97

Merged
rockythorn merged 1 commit into
resf:mainfrom
atomicturtle:fix/71-product-name
Sep 1, 2026
Merged

Align package product_name with the major-stream product label#97
rockythorn merged 1 commit into
resf:mainfrom
atomicturtle:fix/71-product-name

Conversation

@atomicturtle

Copy link
Copy Markdown
Contributor

Summary

  • packages[].product_name was Rocky Linux 9 aarch64 while affected_products[].name was Rocky Linux 9.6 aarch64 (distro-tools#71). Point-release mirror names froze the minor that was current at clone time, so 9.7 scanners dropped 9.6-labeled fixes.
  • Collapse {major}.{minor} in the display name used for both fields, refresh stale product_name on rematch, and default generate_rocky_config.py mirror names to the major (Rocky Linux 9 aarch64 from --version 9.6). riscv64 labels without a minor are unchanged.

Existing rows pick up the stream label on the next rematch. This does not invent empty-package RLSAs.

Test plan

  • python -m unittest apollo.tests.test_rh_matcher_activities.TestStreamProductName
  • After rematch, curl -s https://apollo.build.resf.org/api/v3/advisories/RLBA-2025:2973 | jq '{products: [.affected_products[].name], pkgs: [.packages[].product_name] | unique}' — both sides are Rocky Linux 9 <arch>, not 9.6.

Closes #71

Point-release mirror names (Rocky Linux 9.6 aarch64) froze the minor
that was current at clone time, so packages.product_name and
affected_products.name diverged and 9.7 scanners dropped 9.6-labeled
fixes. Collapse {major}.{minor} in the display name, refresh existing
package rows on rematch, and default new mirror configs to the major.

Closes resf#71

@rockythorn rockythorn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review: Approve

Tests pass, no merge conflicts with main.

Verified

  • stream_product_name() correctly collapses Rocky Linux 9.6 aarch64Rocky Linux 9 aarch64 when match_minor_version is set
  • Names without a minor version (e.g., Rocky Linux 10 riscv64) are unchanged
  • Zero minor version (10.0) correctly collapses to 10
  • generate_rocky_config.py updated to default mirror names to major version when --version includes a dot
  • Stale product_name on existing packages is updated on rematch (not just new packages)
  • bazel test //apollo/tests:test_rh_matcher_activities passes

Note for merge ordering

This PR, along with #89, #90, and #91, all modify rh_matcher_activities.py. They'll need sequential rebasing after the first one merges. This PR is the most independent of the four — it can merge in any position.

Since #89 needs a migration, #90 needs a BUILD fix, and #91 needs a Python 3.9 compat fix, this PR is the most merge-ready of the chain.

@rockythorn
rockythorn merged commit 0c2be90 into resf:main Sep 1, 2026
1 check 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.

Apollo: V3 Get Advisory packages[].product_name does not match affected_products[].name

2 participants