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

when searching, survive errors for multiple registries #1257

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkg/varlinkapi/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,12 @@ func (i *LibpodAPI) SearchImage(call iopodman.VarlinkCall, name string, limit in
for _, reg := range registries {
results, err := docker.SearchRegistry(getContext(), sc, reg, name, int(limit))
if err != nil {
// If we are searching multiple registries, don't make something like an
// auth error fatal. Unfortunately we cannot differentiate between auth
// errors and other possibles errors
if len(registries) > 1 {
continue
}
Copy link
Member

Choose a reason for hiding this comment

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

Might be good to have at least a debug statement above the continue.

Copy link
Member Author

Choose a reason for hiding this comment

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

i believe it ends up in the journal

return call.ReplyErrorOccurred(err.Error())
}
for _, result := range results {
Expand Down