fix(gc): keep tag manifests' digest aliases, reap manifest meta sidecars - #950
Merged
ertime037 merged 1 commit intoSep 3, 2026
Merged
Conversation
The tag-rooted mark walk (getnora-io#938) marked a tag manifest's children (arch manifests, config, layer blobs) but not the digest-named file of the tag manifest itself. The sweep then deleted manifests/sha256:<digest>.json while manifests/<tag>.json — the same bytes — survived, so pull-by-digest 404'd while pull-by-tag worked. The walk now hashes each tag manifest's bytes and marks the sha256:<digest>.json alias as a root, per the OCI distribution spec requirement that content pullable by tag stays pullable by digest. Also reap the .meta.json sidecar together with an orphaned digest manifest; it was invisible to detection on its own and leaked forever. Fixes getnora-io#949 Signed-off-by: Joe Grund <grundjoseph@gmail.com>
jgrund
force-pushed
the
fix/gc-tag-manifest-digest-alias
branch
from
August 31, 2026 18:18
ac95135 to
c295b68
Compare
ertime037
approved these changes
Sep 3, 2026
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.
What
manifests/sha256:<digest>.json— the digest alias of the tag manifest itself — as a root, alongside the children it already marked..meta.jsonsidecar with it; the sidecar was invisible to detection on its own and leaked forever.Why
Fixes #949. Since #938 (v1.2.2), the sweep deleted
manifests/sha256:<digest>.jsonwhilemanifests/<tag>.json— the same bytes — survived, so every pull-by-digest of a tagged image 404'd after the first GC run while pull-by-tag kept working. For proxy-cached or seeded repos whose upstream has moved on, the deleted digest alias was unrecoverable. The OCI distribution spec requires content pullable by tag to stay pullable by digest.Checklist
cargo test)cargo clippy -- -D warnings)