New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: remove image tag only not the image using id #3837
fix: remove image tag only not the image using id #3837
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's missing test where images have same id but different tags, etc
@benoitf I will do that, but that is rather an integration test that should be executed with real podman. I can mock it, but that would not be a correct validation, because I can mock it to work, but it does not mean it works with actual podman. All new code seems to be covered with existing tests. |
307e79c
to
3db0d87
Compare
0ebfacf
to
b7621e5
Compare
187ba03
to
1708563
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so I was testing again and noticed that there is one usecase where we have a regression
I have some leftover images and I was no longer able to remove these images
I've checked with the main branch and it's working so it's related to this PR
it's for images without a tag
for example do
podman pull quay.io/podman/hello
podman untag quay.io/podman/hello
and trying to remove it leads to
then try to remove this image
Good catch. I remember I've seen images like this, but did not pay enough attention to it :(. |
be0770c
to
42fa99e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now it works as expected 👍
maybe add a test for the <none>
usecase as it's not covered by a test, so we might forget about it later
This fix: * switches to use name:tag to delete image * run delete commands as a chain to avoid conflicts when deleting different tags of the same image Fix containers#2673 Signed-off-by: Denis Golovin <dgolovin@redhat.com>
Signed-off-by: Denis Golovin <dgolovin@redhat.com>
Signed-off-by: Denis Golovin <dgolovin@redhat.com>
Signed-off-by: Denis Golovin <dgolovin@redhat.com>
42fa99e
to
cb7f51f
Compare
Signed-off-by: Denis Golovin <dgolovin@redhat.com>
What does this PR do?
Screenshot/screencast of this PR
n/a
What issues does this PR fix or reference?
Fix #2673
How to test this PR?
Create different tags for the same image and try to delete them using podman-desktop ui. The selected tag should be deleted, not all the tags of the same image.