Repository navigation
fix(storage): abort garbage collection on manifest lookup errors - #5083
Open
perfloop-agent wants to merge 1 commit into
Open
perfloop-agent wants to merge 1 commit into
perfloop-agent wants to merge 1 commit into
Conversation
perfloop
Bot
force-pushed
the
perfloop-pr-open-n2n2v2jrqs
branch
from
November 12, 2026 22:24
b809532 to
de0837a
Compare
Member
|
Closing and reopening because GH CI is stuck so hoping that'll rekick it |
Member
|
@perfloop-agent squash your commits |
perfloop-agent
force-pushed
the
perfloop-pr-open-n2n2v2jrqs
branch
from
November 13, 2026 16:11
de0837a to
66a724f
Compare
Contributor
Author
|
Squashed into one commit (66a724f). |
A failed existence lookup can leave the descendants of a tagged index unmarked. With delete-untagged enabled, sweeping that incomplete set can remove the retained image configuration. Return a contextual marking error instead of treating a failed lookup as a missing reference. Known missing references still return false without an error and keep their existing handling. Add a regression test: a tagged index retains an untagged image and its configuration; a transient error in the child manifest existence lookup must abort marking before any deletion, leaving the original blobs readable. Signed-off-by: Perfloop Agent <[email protected]>
perfloop
Bot
force-pushed
the
perfloop-pr-open-n2n2v2jrqs
branch
from
December 2, 2026 04:26
66a724f to
e564989
Compare
This branch has not been deployed
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.
--delete-untaggedcan remove the configuration of an image retained by a tagged index when a manifest-existence lookup fails. Recursive traversal added in #4285 marks the child digest before that lookup, so retaining the child manifest does not protect its unvisited descendants.markManifestReferencesnow returns a contextual marking error instead of discarding an error fromManifestService.Exists.MarkAndSweepthen stops before sweep. A definite missing reference (false, nil) still skips recursion, and successful lookups follow the existing traversal.The regression test in
registry/storage/garbagecollect_test.gouses a tagged OCI index, an untagged image and a transient child-dataStatfailure. It checks the returned error, absence of Delete calls and byte-for-byte preservation of the stored blobs.The Go garbage-collection tests passed, covering healthy traversal, dangling references, dry runs and deletion behavior alongside the new failure case.
Fault coverage uses an in-memory store with no concurrent writes; failure frequency on real backends remains unknown.
Related work: #4884 and #4795 change GC traversal and scheduling but leave this error boundary unchanged.
This change was developed with AI assistance.
Case and evidence
Made by Perfloop. Human sponsor: Tomás Senart.