-
Notifications
You must be signed in to change notification settings - Fork 84
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
Bug 1508724 - Improve logging when using an incorrect tag #536
Conversation
pkg/registries/adapters/adapter.go
Outdated
if err != nil { | ||
log.Errorf("Image '%s' may not exist in registry: %s", image, debug) |
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.
I think using the registry name here, rather then the response body, might make more sense and then you can remove the copy of the byte array?
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.
This error check really is catching two error scenarios: A json decoding error and a request error. I'm going to change this to two different checks by looking for a bad http status code.
I thought about that adding in the registry, but it's embedded in the image variable: http://<registry>/<image>/<tag>
.
If a registry is missing the image with the specified tag, the logging does not indicate what the error could be. Instead, make a suggestion about the error and print out the request body.
The poor logging was identified in: https://bugzilla.redhat.com/show_bug.cgi?id=1508724 |
I just re-use that BZ, I think this is something worth merging IMO |
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.
ACK makes sense.
If a registry is missing the image with the specified tag, the logging does not indicate what the error could be. Instead, make a suggestion about the error and print out the request body.
Describe what this PR does and why we need it:
If you set an incorrect tag for your images in the broker config, the logging
does not indicate what the error is. Instead, make a suggestion
about the error and print out the request body.
Changes proposed in this pull request