-
Notifications
You must be signed in to change notification settings - Fork 382
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
Recognize "manifest unknown" errors reported by Harbor #2413
Conversation
docker/docker_client.go
Outdated
@@ -1097,6 +1097,11 @@ func isManifestUnknownError(err error) bool { | |||
if errors.As(err, &e) && e.ErrorCode() == errcode.ErrorCodeUnknown && e.Message == "Not Found" { | |||
return true | |||
} | |||
// Harbor v2.10.2 | |||
if errors.As(err, &e) && e.ErrorCode() == errcode.ErrorCodeUnknown && strings.Contains(e.Message, "not found") { |
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.
How about replace the error check above with:
if errors.As(err, &e) && e.ErrorCode() == errcode.ErrorCodeUnknown && strings.Contains(strings.ToLower(e.Message), "not found") {
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.
Thanks, good idea. Updated.
062aa69
to
60b732e
Compare
LGTM |
LGTM |
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.
LGTM
Merge at will ✅
LGTM |
For the record, this was confirmed to work in #2203 (comment) . |
... per data in containers#2203 . Signed-off-by: Miloslav Trmač <[email protected]>
... per data in #2203 .