Skip to content

Refresh package product_name per mirror row, not per NEVRA - #105

Merged
rockythorn merged 1 commit into
resf:mainfrom
rockythorn:fix/product-name-per-mirror-row
Nov 13, 2026
Merged

rockythorn merged 1 commit into
resf:mainfrom
rockythorn:fix/product-name-per-mirror-row

Conversation

@rockythorn

Copy link
Copy Markdown
Collaborator

A src or noarch NEVRA is stored once per repo and mirror: emacs's src RPM has a row on each of the x86_64, aarch64, ppc64le and s390x mirrors. create_or_update_advisory_packages looked existing rows up by NEVRA alone, so on every re-match all of those mirrors' packages found the same row. Each mirror's stream_product_name then looked stale against it, and they were all written onto that one row, the last one winning. The result was rows like an x86_64 mirror package labelled "Rocky Linux 10 s390x", the stream label scanners join on.

Changes

  • Look existing rows up by (nevra, repo_name, mirror) for the product_name refresh and the missing-module-field fill, so each row is compared with its own mirror's package.
  • Deciding which NEVRAs are new still uses the NEVRA alone, so this doesn't change which rows get created or removed.

rocky-errata-service fixed the same lookup in 804c439.

Verification

  • Unit tests: 4 new tests in test_rh_matcher_activities (TestPackageRowsPerMirror):

    • each mirror row gets its own product_name
    • a row already labelled for its mirror is left alone
    • each mirror row gets missing module fields
    • a new NEVRA is still created once per mirror

    The first three fail before this change, and the fourth guards the unchanged creation path. All 16 CI unit targets pass.

  • Real matcher run: a 2026-08-31 production snapshot plus a full RH CSAF ingest.

    • A first match on the current code leaves 0 package rows whose product_name differs from their mirror's name.
    • One EL10 re-match on the current code turns that into 558 rows across 227 advisories.
    • An EL10 re-match with this change repairs all 558 (0 left).
    • Every other column of advisory_packages, advisory_affected_products, advisory_cves and advisory_fixes, and the advisory count, is unchanged.
    • An EL8 re-match after that keeps it at 0, with the other columns unchanged.

A src or noarch NEVRA is stored once per repo and mirror: emacs's src
RPM has a row on each of the x86_64, aarch64, ppc64le and s390x
mirrors. create_or_update_advisory_packages looked existing rows up by
NEVRA alone, so on every re-match all of those mirrors' packages found
the same row. Each mirror's stream_product_name then looked stale
against it, and they were all written onto that one row, the last one
winning. The result was rows like an x86_64 mirror package labelled
"Rocky Linux 10 s390x", the stream label scanners join on.

Look existing rows up by (nevra, repo_name, mirror) for the
product_name refresh and the missing-module-field fill, so each row is
compared with its own mirror's package. Deciding which NEVRAs are new
still uses the NEVRA alone, so this doesn't change which rows get
created or removed.

rocky-errata-service fixed the same lookup in 804c439.
@rockythorn
rockythorn force-pushed the fix/product-name-per-mirror-row branch from 8d5bd37 to e29dd66 Compare November 13, 2026 00:54
@rockythorn
rockythorn merged commit 4a89f28 into resf:main Nov 13, 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.

1 participant