Skip to content

Attach OCI Error details to status error so that we can log them#6743

Open
jcarter3 wants to merge 1 commit intomoby:masterfrom
jcarter3:add-error-details
Open

Attach OCI Error details to status error so that we can log them#6743
jcarter3 wants to merge 1 commit intomoby:masterfrom
jcarter3:add-error-details

Conversation

@jcarter3
Copy link
Copy Markdown

@jcarter3 jcarter3 commented May 6, 2026

When debugging errors from a registry, buildkit currenty just logs "400 Bad request". Registries usually send back a JSON error message with a details field that tells why the request was bad, which is very useful when trying to figure out what's going on. This PR is meant to propagate the details field back from the failed registry call so it can be logged appropriately in a debug statement.

Signed-off-by: Jeff Carter <jeff.carter@docker.com>
Copy link
Copy Markdown
Member

@tonistiigi tonistiigi left a comment

Choose a reason for hiding this comment

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

Is this supposed to be a change in remote cache backend? I don't see any mention about it in the PR title or description.

@jcarter3
Copy link
Copy Markdown
Author

jcarter3 commented May 6, 2026

Yes. We're trying to debug an issue someone submitted where buildkit is printing a "400 bad request" error when it goes to push cache to Docker Hub. Docker Hub returns a detail message explaining the issue, but buildkit is swallowing that error so it's not visible to end users. This PR is an attempt to propagate the error message back to the user so it can be properly actioned upon. This is not the only place in buildkit this happens, but it is the instance that is affecting us now.

@tonistiigi tonistiigi added this to the v0.30.0 milestone May 6, 2026
Copy link
Copy Markdown
Member

@tonistiigi tonistiigi left a comment

Choose a reason for hiding this comment

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

This might be better with a helper or defer to capture the possible error for manifest/config upload as well. Eg. 2cd52d8

Unless you specifically know that the error you want to debug only comes from the layers push.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants