-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Added useful error message when image not found #6056
Conversation
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 for improving error messages! I just added two minor comments.
Co-authored-by: Mattt <[email protected]>
Co-authored-by: Mattt <[email protected]>
IMO let's hold off merging this for a couple of days to see if we can land a fix in upstream, as it should be straightforward and that'd be less work than merging this then backing it out when upstream lands a fix. I pinged the maintainer on @honeyankit 's issue, hopefully we get a quick response. |
Pending fix upstream: deitch/docker_registry2#68 |
For what it's worth, I'm looking into actually deleting all of this code at #6150 since I believe it's problematic. |
IMO we should not merge this because even if if the underlying code doesn't get deleted in #6150, the upstream lib will still get patched in deitch/docker_registry2#68. So not worth the trouble to add it here, then pulling it back out once upstream fix arrives... |
This PR is not relevant as the fix is coming from upstream: deitch/docker_registry2#68. |
Context
When an image is not found in the private registry, it throws an exception of
DockerRegistry2::NotFound
and lot of stack trace but this info is not useful for the end user.Error logs: https://github.com/dsp-testing/docker-firewalled-testing/network/updates/500122728
Approach
I'm using a rescue block to catch the "DockerRegistry2::NotFound" exception and throwing it with useful error message when a Dependabot tries to retrieve an image from the registry but it doesn't exist there.