Repository navigation
Conversation
…ure as such A manifest with no media type was taken for an image index when it had a "manifests" key, even when its value is null. It is now an index only when that value is a list. writeCacheEntryManifest reported every failure to create the directory holding the manifest as an invalid OCI artifact. Only the collision with a file of the artifact of that name is one; any other failure (missing directory, permission, full disk) is the host's and is now returned as it is. Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
What this PR does, in one sentence
Two small robustness fixes in the OCI loader: a manifest whose
"manifests"isnullis no longer taken for an image index, and a failure of the host to create a directory of the cache is no longer reported as an invalid artifact.Context
This follows #14490, which docker-agent reviewed. Two of its findings were left for a follow-up:
"manifests"key. With{"manifests": null}the key is present, so the document was read as an index and only failed later with "doesn't refer to compose artifacts", which points at the wrong problem..manifestdirectory was reported asinvalid OCI artifact, including permission errors or a full disk, which have nothing to do with the artifact.What the PR brings
null"manifests"is treated like an absent one: the document is not an index..manifestis reported asinvalid OCI artifact; any other error is returned as it is.manifestsandnull, and a failing directory creation (a missing parent, so it behaves the same on every OS). The existing test for the collision is unchanged.🤖 Generated with Claude Code