Skip to content

Recognize "manifest unknown" errors reported by Harbor#2413

Merged
rhatdan merged 1 commit intocontainers:mainfrom
mtrmac:harbor-404
May 16, 2024
Merged

Recognize "manifest unknown" errors reported by Harbor#2413
rhatdan merged 1 commit intocontainers:mainfrom
mtrmac:harbor-404

Conversation

@mtrmac
Copy link
Collaborator

@mtrmac mtrmac commented May 13, 2024

... per data in #2203 .

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) .

... per data in containers#2203 .

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@rhatdan rhatdan merged commit a00a151 into containers:main May 16, 2024
@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