c8d/load: Don't unpack pseudo images #45644
Merged
neersighted merged 5 commits intomoby:masterfrom Jun 2, 2023
Merged
Conversation
9e3d5ea to
89e7770
Compare
neersighted
requested changes
May 30, 2023
89e7770 to
cd2dd3a
Compare
The default implementation of the containerd.Image interface provided by the containerd operates on the parent index/manifest list of the image and the platform matcher. This isn't convenient when a specific manifest is already known and it's redundant to search the whole index for a manifest that matches the given platform matcher. It can also result in a different manifest picked up than expected when multiple manifests with the same platform are present. This introduces a walkImageManifests which walks the provided image and calls a handler with a ImageManifest, which is a simple wrapper that implements containerd.Image interfaces and performs all containerd.Image operations against a platform specific manifest instead of the root manifest list/index. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Don't unpack image manifests which are not a real images that can't be unpacked. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
cd2dd3a to
4d3238d
Compare
neersighted
reviewed
May 31, 2023
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
neersighted
approved these changes
Jun 2, 2023
Member
neersighted
left a comment
There was a problem hiding this comment.
This form LGTM; I think this is fine with a squash 👍
Member
I'm good with keeping them separate; it's slightly easier to follow the changes |
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 I did
docker load.- How I did it
Introduced a function which walks over a containerd image and calls the provided handler on a
containerd.Imagewrapper, that acts against the platform-specific manifest, instead of the parent manifest list.This is a more convenient way to interact with a multi platform image by
containerd.Imageinterface when acting on a specific platform-manifest.See individual commits for details.
- How to verify it
- Description for the changelog
containerd integration: Fix
docker loadfailing when loading an image with attestations- A picture of a cute animal (not mandatory but encouraged)