Skip to content

don't print build details when progress is rawjson #2252

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

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Feb 9, 2024

when a build is ran using --progress=rawjson output should only contain line-delimited json stream
PrintBuildDetails to display an additional human-readable message at the end of the build breaks parsing this stream

Another option would be to use stdout for json and stderr for such messages

Copy link
Member

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

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

Looks good

Can you also add it to build command:

if progressMode != progressui.QuietMode {

We might as well skip printing image id / digest in raw json mode:

fmt.Println(getImageID(resp.ExporterResponse))

Also skip printing warnings with this mode:

if len(warnings) == 0 || mode == progressui.QuietMode {

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Copy link
Member

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

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

LGTM thanks

@tonistiigi tonistiigi merged commit 67d9385 into docker:master Feb 10, 2024
@ndeloof ndeloof deleted the rawjson branch July 30, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants