Skip to content

containerd: prioritize non-dangling images with image list#49672

Merged
robmry merged 1 commit intomoby:masterfrom
jsternberg:containerd-prioritize-non-dangling
Mar 27, 2025
Merged

containerd: prioritize non-dangling images with image list#49672
robmry merged 1 commit intomoby:masterfrom
jsternberg:containerd-prioritize-non-dangling

Conversation

@jsternberg
Copy link
Collaborator

When listing images, prioritize the tagged version. When computing the
unique images, the last returned image would be used as a base and repo
tags would be merged into it.

This makes it so RepoDigests has the correct value when there is both
a dangling and non-dangling version of the same image.

When listing images, prioritize the tagged version. When computing the
unique images, the last returned image would be used as a base and repo
tags would be merged into it.

This makes it so `RepoDigests` has the correct value when there is both
a dangling and non-dangling version of the same image.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
@vvoland vvoland added status/2-code-review area/images Image Distribution kind/bugfix PR's that fix bugs containerd-integration Issues and PRs related to containerd integration labels Mar 25, 2025
@vvoland vvoland added this to the 28.0.4 milestone Mar 25, 2025
Copy link
Contributor

@vvoland vvoland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@vvoland vvoland modified the milestones: 28.0.4, 28.0.5 Mar 25, 2025
@robmry
Copy link
Contributor

robmry commented Mar 26, 2025

This LGTM - but should it have a regression test?

@jsternberg
Copy link
Collaborator Author

@robmry it might be difficult to create a regression test for this unless something like #49669 being merged since the current daemon doesn't create the dangling image on creation at the moment. I think this would end up being covered by some existing tests if we change the default behavior for creating dangling images since test failures on the above PR is the reason I found this to begin with.

@robmry
Copy link
Contributor

robmry commented Mar 27, 2025

@robmry it might be difficult to create a regression test for this unless something like #49669 being merged since the current daemon doesn't create the dangling image on creation at the moment. I think this would end up being covered by some existing tests if we change the default behavior for creating dangling images since test failures on the above PR is the reason I found this to begin with.

Got it - thank you!

@robmry robmry merged commit a420005 into moby:master Mar 27, 2025
161 checks passed
@jsternberg jsternberg deleted the containerd-prioritize-non-dangling branch March 27, 2025 18:34
@thompson-shaun thompson-shaun modified the milestones: 28.0.5, 28.1.0 Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/images Image Distribution containerd-integration Issues and PRs related to containerd integration kind/bugfix PR's that fix bugs status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants