Skip to content

fix(countme): count every published image variant under its family - #1250

Open
castrojo wants to merge 1 commit into
mainfrom
fix/countme-variant-counting
Open

fix(countme): count every published image variant under its family#1250
castrojo wants to merge 1 commit into
mainfrom
fix/countme-variant-counting

Conversation

@castrojo

Copy link
Copy Markdown
Contributor

The bug

Clients send the published image name. The aggregation matched bare family ids and filtered on them in SQL, so these were all discarded before the counting rules saw them:

bluefin-nvidia            bluefin-lts-hwe
bluefin-lts-nvidia        bluefin-lts-hwe-nvidia
dakota-nvidia             dakota-nvidia-gaming

Every one is a real published image.

The fix

  • normalizeCountmeRepo strips -nvidia and -hwe, then folds into the family. Longest family first, so an LTS image is never counted as flagship.
  • Removed the repo IN (...) SQL filter — it pre-filtered to bare ids and dropped variants before normalization could fold them.
  • Game mode stays an attribute, not an image.

What this does and does not change

It does not move today's numbers. D1 currently holds only five distinct repo values (bluefin, bluefin-lts, dakota, dakota-gaming, eos) — no variant has ever reached the service. The fix means they count correctly when they do.

Ingest itself is verified working: a probe sent to /metalink landed in telemetry_events and was removed again.

Verification

  • Worker deployed: 100c8cb8-f7df-46f8-9dff-0af607a2637e.
  • New tests: every variant folds to its family; an LTS variant lands in the LTS total and not flagship (2 + 40 + 11 = 53); an nvidia flagship build stays flagship; eos and fedora still return null; folding is idempotent.
  • just check: 0 lint errors, 1050/1050 tests pass. npm run build:ci succeeds.

Also removes adr/.

Clients send the published image name, so the id on the wire is
`bluefin-lts-hwe-nvidia`, not `bluefin-lts`. The aggregation matched bare family
ids and filtered on them in SQL, so every hardware and driver build was
discarded before the counting rules ever saw it.

- `normalizeCountmeRepo` strips `-nvidia` and `-hwe` and folds the result into
  its family, longest family first so an LTS image is never counted as flagship.
- The SQL repo filter is gone; it pre-filtered to bare ids and dropped the
  variants before normalization could fold them.
- Game mode stays an attribute, not an image.

Removes adr/.
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