-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
[CRI] Continue remove image when can't find image id with ImageRef #45808
Conversation
Hi @Crazykev. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
@@ -101,8 +101,6 @@ func (ds *dockerService) RemoveImage(image *runtimeapi.ImageSpec) error { | |||
} | |||
} | |||
return nil | |||
} else if err != nil && libdocker.IsImageNotFoundError(err) { |
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.
It should return err if error is not ImageNotFoundError
and not nil.
Also should add a comment for the reason: dockerclient.InspectImageByID doesn't work with digest and repoTags, it is safe to continue removing it since there is another check below.
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.
@feiskyer THX~ Updated!
Signed-off-by: Crazykev <crazykev@zju.edu.cn>
@k8s-bot ok to test |
/assign @yujuhong @Random-Liu |
/unassign @ncdc |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Crazykev, yujuhong
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue (batch tested with PRs 45171, 43947, 45788, 45822, 45808) |
Signed-off-by: Crazykev crazykev@zju.edu.cn
What this PR does / why we need it:
Should try to remove imageRef as repo:tag when can't find it as imageID.
/cc @feiskyer @Random-Liu PTAL
also /cc @xlgao-zju @heartlock
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Special notes for your reviewer:
Release note: