feat(usagedata): add the RPM format value (S38 plan: 10/59)

Summary

  • Problem: usage data has no rpm format value. Once RPM repositories exist, every push, pull and delete event on them would be held back as format_unmapped, and the warehouse would never see RPM.
  • Impact: nobody sees a change today. No RPM repository can be created until Step 54, so no event carries format code 7 yet.
  • Change: adds FormatRpm (rpm), lets Validate accept it, and maps repositories.format code 7 to it in the anchored gate. RPM is still on the tests' pending list, so the format totality test now accepts a mapped code that is on that list.
  • Downsides: none known. The map holds one code that RepositoryFormats() does not list until Step 53.

Checklist

  • Ran it: n/a. No route emits an RPM event yet. The positive-hit test sends code 7 through TrackAnchored to a fake collector and reads format=rpm back.
  • Interfaces and data: the usage-data format dimension gains rpm. The Snowplow schema artifact_registry_context/1-0-0 types format as a plain string up to 255 characters, so it accepts rpm as is. S23 already lists rpm in the Format enum, so no spec change.
  • Failure: no new failure path. A code outside the map is still withheld as format_unmapped.
  • Rollout: no schema or configuration change. An older binary has no RPM rows to read.
  • Hot path: one more entry in a static map. No new work.
  • Database: n/a.
  • Security: n/a. No input, route or permission.
  • ADRs: ADR-012 (usage data): RPM events carry the format in artifact_registry_context, as rule 6 says. ADR-030 (signing keys) sets nothing for usage data.
  • E2E: none. Step 55 adds the RPM e2e catalog once a repository can exist.
  • Simplicity: I kept the existing helper and added a pending argument, instead of a second RPM-only totality test.

Merge order

No open MR touches these files. It depends only on Step 7, which merged.

What this does not cover

No RPM event fires yet. The pull event comes in Step 38, the push event in Step 41 and the delete event in Step 48.

Closes #1959 (closed)

Merge request reports

Loading
Loading