This repository was archived by the owner on Mar 23, 2026. It is now read-only.
Docker Utils: Expose the build logs#12376
Merged
Conversation
dfangl
approved these changes
Mar 13, 2025
Member
dfangl
left a comment
There was a problem hiding this comment.
Looks good! In general, with the build tool, we will have a mismatch because the CLI might use buildkit, but the sdk client currently does not allow us to use it (as it would need to pass the "version" query parameter through).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
When building a Docker image in the background, it is sometimes necessary for API parity to also expose the build log to the user.
This PR changes the internal Docker-utils class to return the logs, so that we have the option to expose them where necessary.
Note that the previous method signature was to return
None, so this is a non-breaking change.Testing
The exact build logs are very different between the SDK and CMD.
An example output from the SDK:
Building the same image from the CMD:
That's why the test assertions are kept simple. In fairness, I don't think we should make the assertions too strict anyway - what the Docker Engine exactly returns is not relevant, as long as there is some output.