fix(oci): derive image ref.name annotation from the pinned FSDK version - #37
Merged
Conversation
Every OCI assembly element hardcoded
org.opencontainers.image.ref.name: ghcr.io/projectbluefin/<name>:latest
but #34 removed the mutable `:latest` tag. `just tags` now publishes only the
FSDK minor line (25.08) and the immutable point release (25.08.15), so every
published image carried a standard OCI annotation whose reference resolves to
nothing — a dead pointer for any consumer or tool that trusts it.
Substitute the point release instead: `%{fsdk-version}`, the same value
`just tags` and the `org.opencontainers.image.version` label already use. It
comes from `include/fsdk-version.yml`, which `just bst` regenerates on every
invocation from the pinned ref in `elements/freedesktop-sdk.bst` — the exact
mechanism `podman-vm/podman-vm-efi.bst` already uses. The annotation therefore
cannot drift: a version bump updates it automatically with no checklist step.
Rejected alternatives:
- Remove the annotation. Defensible (one manifest is published under several
tags, so no single tag is "the" ref name) but it drops metadata tooling
reads, and the point release is genuinely the most precise published name.
- Hardcode the minor line (`:25.08`). Goes stale when the minor line moves and
reintroduces exactly the failure mode that caused this bug: a literal tag in
a .bst file that a human must remember to update.
The point release is immutable and always published, so unlike the minor line
it also stays correct forever once written.
Docs updated so the next image does not reintroduce the bug: add-new-image.md
documented setting this annotation to a literal tag, and container-standards.md
/ bump-fsdk-version.md now state the annotation is derived, not maintained.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
#34 removed the mutable
:latesttag.just tagsnow emits only the FSDK minor line (25.08) and the immutable point release (25.08.15), plus pre-release/beta tags; the local build/verify/push recipes use a private, never-publishedlocal_tag := "build".Every OCI assembly element still hardcoded:
So every published image carries a standard OCI annotation that self-describes it with a reference resolving to nothing. Any consumer or tool that trusts
org.opencontainers.image.ref.namegets a dead pointer.Fix
Substitute
%{fsdk-version}— the exact pinned FSDK point release:This is the same value
just tagsemits as the immutable tag and the same value theorg.opencontainers.image.versionlabel already carries (Justfile:196), so the annotation is consistent with the rest of the OCI metadata.The value comes from
include/fsdk-version.yml, whichjust bstregenerates on every invocation from the pinnedref:inelements/freedesktop-sdk.bst(gitignored, never hand-edited). This is the mechanismelements/podman-vm/podman-vm-efi.bstalready uses; the OCI elements now include it alongside the existinginclude/slim.yml:It cannot drift. A version bump updates the annotation automatically — no checklist step, no hardcoded literal.
Options considered and rejected
:25.08). Goes stale when the FSDK minor line moves, and being a literal in a.bstfile it becomes another thing the version bump must remember — exactly the failure mode that produced this bug.The dynamic point release wins on all axes: immutable, always published, always correct.
Scope
All seven elements that carried the annotation —
base,static,skopeo,lab-runner,python,buildah,qemu-img.elements/oci/brew-nspawn.bstsets noindex-annotationsand is untouched.Docs updated so the next image does not reintroduce the bug:
docs/skills/add-new-image.md— documented setting the annotation to a literal tag (:build); now documents the substitution and the required variable include.docs/skills/container-standards.md— records thatref.nameis derived, never hardcoded, never:latest.docs/skills/bump-fsdk-version.md— states the bump needs no edit to the annotation.Verification
Verified:
just validatepasses — the full element graph (all OCI targets +podman-vm/podman-vm-efi.bst) resolves with the added variable include.just bst show --deps none --format '%{config}' oci/base.bst oci/python.bstrenders:'org.opencontainers.image.ref.name': 'ghcr.io/projectbluefin/base:25.08.15''org.opencontainers.image.ref.name': 'ghcr.io/projectbluefin/python:25.08.15'which matches
just tagsoutput (25.08/25.08.15).NOT verified by building: no full image build was run, so the annotation was not read back out of a produced OCI index with
skopeo inspect. Thebuild-ociheredoc is passed through verbatim by the script element, and the rendered command above is exactly whatbuild-ocireceives, so the only unverified step isbuild-oci's own handling ofindex-annotations— unchanged by this PR.Nothing in this repo reads
org.opencontainers.image.ref.name(nojust verifygate, workflow, or test references it), so no in-repo consumer breaks..pre-commit-config.yamldoes not exist; nothing to run.