Skip to content
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

Merged
merged 1 commit into from
May 16, 2024

Conversation

mtrmac
Copy link
Collaborator

@mtrmac mtrmac commented May 13, 2024

... per data in #2203 .

@@ -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") {
Copy link
Member

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") {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, good idea. Updated.

@mtrmac mtrmac force-pushed the harbor-404 branch 2 times, most recently from 062aa69 to 60b732e Compare May 14, 2024 09:17
@rhatdan
Copy link
Member

rhatdan commented May 14, 2024

LGTM
@giuseppe @vrothberg @mheon PTAL

@mheon
Copy link
Member

mheon commented May 14, 2024

LGTM

Copy link
Member

@vrothberg vrothberg left a 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 ✅

@TomSweeneyRedHat
Copy link
Member

LGTM
but it looks like the branch may need to be updated @mtrmac

@mtrmac
Copy link
Collaborator Author

mtrmac commented May 16, 2024

For the record, this was confirmed to work in #2203 (comment) .

@rhatdan rhatdan merged commit a00a151 into containers:main May 16, 2024
10 checks passed
@mtrmac mtrmac deleted the harbor-404 branch May 16, 2024 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants