Amend AR ADR-007 for RPM packages
Summary
- Problem: the RPM hosted spec (S38, gitlab-org/ops/artifact-registry!3497 (merged)) needs a format value and four tables that ADR-007 does not have. Today the document stops at
5=go, and RPM appears nowhere in the cross-format lists, the cascade rules or the storage-accounting walks. - Decision: add
7=rpmwith a hosted-onlyCHECK, a short RPM Repositories section in the shape the Go one already uses, and RPM to every per-format enumeration the document already keeps. The four tables' columns stay in S38, not here.
Checklist
- Reach: the RPM hosted spec, and the shared signing-key table ADR-030 introduces, because RPM is its second consumer after Debian and the
NO ACTIONkeys decide what a key delete does across both. The format value also reaches every other format amendment in flight, since the enum is one line. - Least sure: the format value, which is the one thing in here I would not merge without reading the note below.
7holds only if Debian takes6. Second is how much schema an ADR owes: I started with a full section in the Maven and Debian shape and cut it to the Go shape, 1,553 words down to 168. If the four tables belong here rather than in S38, say so. - Agreement:
- The Engineering Lead, or a Staff+ cover, approves. Nobody is asked yet.
- Merge after Add Artifact Registry ADR 030: Repository Signi... (!21615 - closed) and Amend AR ADR-004, ADR-007, ADR-009 and ADR-021 ... (!21653 - closed).
rpm_repositorieshas twoNO ACTIONforeign keys intorepository_signing_keys, and that table arrives with !21653 (closed). - Merge after or alongside Amend AR ADR-009 for RPM packages (!21740 - closed) (the ADR-009 RPM amendment). This section does not link
009_api_design.md#rpm:hugolint linkcheckrefuses the anchor until that merges, the same reason ADR-030 is named in prose. The third of the set is !21739 (closed) (ADR-004), which this section does link, for the files-per-version cap. - Merge before gitlab-org/ops/artifact-registry!3497 (merged), because S38 cites this amendment.
- Durability: remote or virtual RPM repositories, source RPMs, or a decision to serve
comps,updateinfoor module metadata. The first drops theCHECK; the last addstypevalues torpm_metadata_files.
The format value
7 is a bet on merge order, and the bet is currently backwards in three places, so here is the state as of 2026-10-27.
Handbook main reads 5=go, and has since commit 8dc564ef on 10-23. Debian is not in this document at all yet. !21653 (closed) predates that commit and still writes 5=debian, so its enum line conflicts on rebase and Debian wants 6; gitlab-org/ops/artifact-registry!3447 (merged) and !3484 (merged) both still claim 5 from their own side. This MR takes 7 on the assumption Debian lands on 6, which leaves a gap at 6 in the enum if this merges first. That gap is the reason for the merge-order bullet above, and swapping RPM to 6 is a one-line change if Debian would rather have 7. I have raised it on !21653 (closed) rather than touching anyone's branch.
What changes
| Section | Change |
|---|---|
repositories |
The format enum gains 7=rpm. The kind column gains CHECK (format <> 7 OR kind = 0), because RPM is hosted only for now, following what Go and generic already do. |
| RPM Repositories | A new section between Go and Blob storage, in the shape the Go one uses: the tables exist, this ADR does not define their columns, and S38 does. It states only what crosses a format boundary, which is the signing-key keys and where the metadata files sit. |
| Signing keys | One signing key per repository, and a second only through a rotation, because dnf5 rejects a repomd.xml.asc with two signatures in one block. Both are NO ACTION foreign keys into the shared repository_signing_keys table, composite so a key stays in its own namespace, so a key delete that a repository still selects is refused by the database and answered 409. |
| Cross-format lists | RPM joins the hosted-formats bullet, the repositories description, the cascade-delete lists, the repository-level overrides note, the blob_storage_attachments client list and the buffered-writes last_downloaded_at list. |
| Storage accounting | rpm_versions joins components_count and the reconciliation union, which goes from eight counts to nine. A repository-level walk bullet for RPM, including the rpm_metadata_files union, because those rows are keyed at the repository and no version reaches them. An artifact-level bullet saying rpm_versions.size_bytes is set at commit and never changes, for the same reason container_manifests.size does not: one version, one content-addressed file. |
ADR-007 is 37,590 words against a 5,000-word limit, so this adds 348 words it should not, down from 1,733 before the section took the Go shape. Amend AR ADR-004, ADR-007, ADR-009 and ADR-021 ... (!21653 - closed) adds 2,143 to the same file. Neither should be paid for by rewriting prose we did not write inside an amendment MR, so it wants a decision above these MRs.