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

registry errors lack detail #2019

Closed
errordeveloper opened this issue Mar 12, 2021 · 2 comments · Fixed by #2981
Closed

registry errors lack detail #2019

errordeveloper opened this issue Mar 12, 2021 · 2 comments · Fixed by #2981

Comments

@errordeveloper
Copy link
Contributor

errordeveloper commented Mar 12, 2021

When tagging an image with multiple registries using buildx, push errors carry too little context, here is an example:

 => ERROR exporting to image                                                                        2.3s
 => => exporting layers                                                                             0.0s
 => => exporting manifest sha256:ffa0b92bcd6b8f5c40ffedb3c61d92ae96852c8a772ffe71821f2a2b9bf430f1   0.0s
 => => exporting config sha256:034c62d91e4d09126acfd0855dfef66f6e5511f7eec9080e0b2201a5a989abca     0.0s
 => => pushing layers                                                                               2.3s
------
 > exporting to image:
------
error: failed to solve: rpc error: code = Unknown desc = unexpected status: 401 UNAUTHORIZED

The only way to tell which of the registries replied with this error, is to try pushing to one registry at a time, which is not easy in CI, especially if errors occur sporadically.

At very least it would be good to see the URL, but seeing request payload (perhaps in debug mode) would be nice too.

This turns out to be a buildkit issue and not a buuildx one, as all of the error message are passed along using very generic machinery, so the context will have to come from buildkit. It doesn't help that there is grcp client as well, which may need a small change to accommodate for fixing this.

I have started by improving containerd (containerd/containerd#5164), but I am little lost in buildkit code, so will need some concrete pointers.

@errordeveloper
Copy link
Contributor Author

Also, even when only one registry is being used, it's still hard to tell what could be wrong. I also wonder what it might look like for multiple images in the context of buildx bake.

@thaJeztah
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants