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
internal/registry: Add URL to error message for clarity #29298
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.
This seems reasonable to me. Have you been able to verify what it looks like when there is such a failure? Does the UI really fail to wrap the error message?
I added some custom transports (locally) to simulate Here is a screenshot from my testing It's not amazing but I feel that the value of that message is greater with a full URL and this probably matters more? |
4bdb93e
to
cebb838
Compare
cebb838
to
4e20de9
Compare
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 adding this! Those screenshots look as good as we can hope for, and I agree that the URL will be helpful for debugging.
@alisdair would you like me to add this to the Changelog, or is it such a minor change for most users (which only ever hit the happy path) that it's not worth mentioning? If so - which Changelog (1.1.0 / 1.0.x)? Relatedly - what's your policy on backports? I'm okay with not backporting this FWIW, although it's minor enough that it may be low effort to backport? 🤷🏻♂️ |
I'd also skip the changelog, personally. It's not fixing a known issue, and it's not something anyone needs to be aware of in order to adjust their workflow. Our policy for backports is loosely that only fixes for known issues or other critical changes go into patch releases. This doesn't seem like it's either of those, so I'd leave it on |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Prior to this patch the user could receive a message like this from
init
:While the status code is helpful, it would be far more helpful if the user knew what URL/hostname returned that error.
I mistakenly thought this would come from the Registry API, but @bethanyr helpfully pointed out to me that the checksums are in fact pulled from GitHub.
The new (proposed) error message would therefore indicate this:
I am also open to shortening this to just the hostname (
github.com
in this case) instead of full URL if we deem that whole URL makes the message too long.