[24.0 backport] c8d/load: Don't unpack pseudo images#45688
Merged
neersighted merged 5 commits intomoby:24.0from Jun 2, 2023
Merged
[24.0 backport] c8d/load: Don't unpack pseudo images#45688neersighted merged 5 commits intomoby:24.0from
neersighted merged 5 commits intomoby:24.0from
Conversation
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> (cherry picked from commit fabc1d5) Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com> (cherry picked from commit 5210f48) Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com> (cherry picked from commit b08bff8) 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> (cherry picked from commit 4d3238d) Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com> (cherry picked from commit 4295806) Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
neersighted
approved these changes
Jun 2, 2023
Member
|
Failure is unrelated: |
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)