c8d: Use the same logic to get the present images#47336
Merged
thaJeztah merged 1 commit intomoby:masterfrom Feb 6, 2024
Merged
c8d: Use the same logic to get the present images#47336thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah merged 1 commit intomoby:masterfrom
Conversation
thaJeztah
reviewed
Feb 6, 2024
Comment on lines
7
to
6
|
|
||
| "github.com/containerd/containerd/images" | ||
| containerdimages "github.com/containerd/containerd/images" |
Member
There was a problem hiding this comment.
LOL. Again!
We really need to look which linter we're missing that should check for this.
thaJeztah
reviewed
Feb 6, 2024
| } | ||
|
|
||
| var presentImages []imagespec.DockerOCIImage | ||
| err = i.walkImageManifests(ctx, desc, func(img *ImageManifest) error { |
Member
There was a problem hiding this comment.
I think there's actually a bug in this code; but I found some other code that needs to be looked at as well; see
Member
Author
There was a problem hiding this comment.
I added platform filtering. Ptal
vvoland
reviewed
Feb 6, 2024
daemon/containerd/image.go
Outdated
|
|
||
| var ociimage imagespec.DockerOCIImage | ||
| if err := readConfig(ctx, i.content, conf, &ociimage); err != nil { | ||
| if cerrdefs.IsNotFound(err) { |
Contributor
There was a problem hiding this comment.
readConfig is our function and uses our errdefs 😛
Suggested change
| if cerrdefs.IsNotFound(err) { | |
| if errdefs.IsNotFound(err) { |
Inspect and history used two different ways to find the present images. This made history fail in some cases where image inspect would work (if a configuration of a manifest wasn't found in the content store). With this change we now use the same logic for both inspect and history. Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
dmcgowan
approved these changes
Feb 6, 2024
Member
|
failures on Windows are expected with c8d snapshotters enabled. Bringing this one in |
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
Inspect and history used two different ways to find the present images. This made history fail in some cases where image inspect would work (if a configuration of a manifest wasn't found in the content store).
With this change we now use the same logic for both inspect and history.
Related change for inspect #46238
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)