-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
buildctl: add dump #5
Merged
Merged
Conversation
This file contains 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
Signed-off-by: Akihiro Suda <[email protected]>
Thanks. As a follow up can you group this behind a |
The actual visualization of graph could be something like |
tiborvass
pushed a commit
to tiborvass/buildkit
that referenced
this pull request
Sep 29, 2018
…stomName Example Dockerfile: FROM busybox ARG foo=abc ENV bar=def RUN echo $foo $bar $baz Output without fix: moby#5 [2/2] RUN echo def moby#5 digest: sha256:647df948c9689163efaf92b24b38779bc9f8b350482ecc3de3533f86a544c196 moby#5 name: "[2/2] RUN echo def " moby#5 started: 2018-09-29 19:01:11.376665368 +0000 UTC moby#5 0.764 abc def moby#5 completed: 2018-09-29 19:01:12.320141054 +0000 UTC moby#5 duration: 943.475686ms Output with fix: moby#5 [2/2] RUN echo abc def moby#5 digest: sha256:647df948c9689163efaf92b24b38779bc9f8b350482ecc3de3533f86a544c196 moby#5 name: "[2/2] RUN echo abc def " moby#5 started: 2018-09-29 19:01:11.376665368 +0000 UTC moby#5 0.764 abc def moby#5 completed: 2018-09-29 19:01:12.320141054 +0000 UTC moby#5 duration: 943.475686ms Signed-off-by: Tibor Vass <[email protected]>
thaJeztah
referenced
this pull request
in thaJeztah/buildkit
Apr 9, 2020
Currently, `docker build --progress=plain` truncates output, which makes it difficult to debug problems during build (the step that failed may not be the cause of the failure). For example, in the following build, the output of the `RUN echo ...` is truncated: DOCKER_BUILDKIT=1 docker build --no-cache --progress=plain -t foo -<<EOF FROM busybox RUN echo "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas ut lorem nec leo euismod vestibulum. Donec tortor nisl, iaculis at vehicula vel, interdum eu orci. Integer velit lacus, congue id magna eu, mollis accumsan augue. Aliquam non venenatis risus, eu posuere libero. Vestibulum ante ipsum primis in faucibus orci luctus." > /somewhere RUN echo "something went wrong"; exit 1 EOF #5 [2/3] RUN echo "Lorem ipsum dolor sit amet, consectetur adipiscing elit.... #5 DONE 0.2s #6 [3/3] RUN echo "something went wrong"; exit 1 #6 0.211 something went wrong #6 ERROR: executor failed running [/bin/sh -c echo "something went wrong"; exit 1]: runc did not terminate sucessfully ------ > [3/3] RUN echo "something went wrong"; exit 1: ------ failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c echo "something went wrong"; exit 1]: runc did not terminate sucessfully While there is an existing `PROGRESS_NO_TRUNC` environment variable, I think that this should be the default if the user opted to use `--progress=plain` (or in situations where no TTY is attached, which could be in CI). This patch changes the default to disable truncating in those situations, but allowing users to opt-out by setting `PROGRESS_NO_TRUNC=0` With this change the same build looks like this: #5 [2/3] RUN echo "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas ut lorem nec leo euismod vestibulum. Donec tortor nisl, iaculis at vehicula vel, interdum eu orci. Integer velit lacus, congue id magna eu, mollis accumsan augue. Aliquam non venenatis risus, eu posuere libero. Vestibulum ante ipsum primis in faucibus orci luctus." > /somewhere #5 sha256:b2f0f47d63911ee55e7cf17c81007310e28190b5be84aa1a7869ba90786d5cee #5 DONE 0.2s #6 [3/3] RUN echo "something went wrong"; exit 1 #6 sha256:c037b34bb998ae7d30572b489286da14df87e1478adf6d0c5c71c79b84b11bcc #6 0.293 something went wrong #6 ERROR: executor failed running [/bin/sh -c echo "something went wrong"; exit 1]: runc did not terminate sucessfully ------ > [3/3] RUN echo "something went wrong"; exit 1: ------ failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c echo "something went wrong"; exit 1]: runc did not terminate sucessfully Signed-off-by: Sebastiaan van Stijn <[email protected]>
alexcb
pushed a commit
to alexcb/buildkit
that referenced
this pull request
Nov 6, 2020
Experimental host bind-mount
tianon
added a commit
to infosiftr/buildkit
that referenced
this pull request
Aug 30, 2022
This edge case was already handled for `CANCELED` or `ERROR`, but not `DONE` (or `CACHED`, which shouldn't have logs, but 🤷). Before: ```console $ docker buildx build --progress=plain --no-cache - <<<$'FROM bash\nRUN echo -n no newline' ... moby#5 [2/2] RUN echo -n no newline moby#5 0.268 no newline#5 DONE 0.3s ... ``` After: ```console $ docker buildx build --progress=plain --no-cache - <<<$'FROM bash\nRUN echo -n no newline' ... moby#5 [2/2] RUN echo -n no newline moby#5 0.268 no newline moby#5 DONE 0.3s ... ``` Signed-off-by: Tianon Gravi <[email protected]>
profnandaa
added a commit
to profnandaa/buildkit
that referenced
this pull request
Aug 22, 2024
`shlex` in was treating single backslash "\\" in string as escape sequence, hence stripping them off. Modify `processCmdEnv` to double escape `\\`. This was in turn affecting the vertex `Name`, and mostly pronounced on Windows where backslashes are prevalent in path names. For example `C:\hello\world\path` was being rendered as `C:helloworldpath`, hence confusing users. Fixes moby#5250 Build progress before fix: ``` moby#5 [2/4] RUN echo C:helloworldpath moby#5 1.359 C:\hello\world\path moby#5 DONE 1.7s moby#6 [3/4] RUN echo C:\hello\escaped\path moby#6 1.734 C:\\hello\\escaped\\path moby#6 DONE 2.1s moby#7 [4/4] RUN echo "C:\hello\quoted\path" moby#7 1.765 "C:\hello\quoted\path" moby#7 DONE 2.1s ``` Build progress after fix: ``` moby#5 [2/4] RUN echo C:\hello\world\path moby#5 1.458 C:\hello\world\path moby#5 DONE 1.8s moby#6 [3/4] RUN echo C:\\hello\\escaped\\path moby#6 1.730 C:\\hello\\escaped\\path moby#6 DONE 2.1s moby#7 [4/4] RUN echo "C:\hello\quoted\path" moby#7 1.702 "C:\hello\quoted\path" moby#7 DONE 2.1s ``` You can also see that now paths in the step/vertex names now match those in the log lines right after the name. Signed-off-by: Anthony Nandaa <[email protected]>
profnandaa
added a commit
to profnandaa/buildkit
that referenced
this pull request
Aug 22, 2024
`shlex` in was treating single backslash "\\" in string as escape sequence, hence stripping them off. Modify `processCmdEnv` to double escape `\\`. This was in turn affecting the vertex `Name`, and mostly pronounced on Windows where backslashes are prevalent in path names. For example `C:\hello\world\path` was being rendered as `C:helloworldpath`, hence confusing users. Fixes moby#5250 Build progress before fix: ``` moby#5 [2/4] RUN echo C:helloworldpath moby#5 1.359 C:\hello\world\path moby#5 DONE 1.7s moby#6 [3/4] RUN echo C:\hello\escaped\path moby#6 1.734 C:\\hello\\escaped\\path moby#6 DONE 2.1s moby#7 [4/4] RUN echo "C:\hello\quoted\path" moby#7 1.765 "C:\hello\quoted\path" moby#7 DONE 2.1s ``` Build progress after fix: ``` moby#5 [2/4] RUN echo C:\hello\world\path moby#5 1.458 C:\hello\world\path moby#5 DONE 1.8s moby#6 [3/4] RUN echo C:\\hello\\escaped\\path moby#6 1.730 C:\\hello\\escaped\\path moby#6 DONE 2.1s moby#7 [4/4] RUN echo "C:\hello\quoted\path" moby#7 1.702 "C:\hello\quoted\path" moby#7 DONE 2.1s ``` You can also see that now paths in the step/vertex names now match those in the log lines right after the name. Signed-off-by: Anthony Nandaa <[email protected]>
profnandaa
added a commit
to profnandaa/buildkit
that referenced
this pull request
Sep 9, 2024
`shlex` in was treating single backslash "\\" in string as escape sequence, hence stripping them off. Modify `processCmdEnv` to double escape `\\`. This was in turn affecting the vertex `Name`, and mostly pronounced on Windows where backslashes are prevalent in path names. For example `C:\hello\world\path` was being rendered as `C:helloworldpath`, hence confusing users. Fixes moby#5250 Build progress before fix: ``` moby#5 [2/4] RUN echo C:helloworldpath moby#5 1.359 C:\hello\world\path moby#5 DONE 1.7s moby#6 [3/4] RUN echo C:\hello\escaped\path moby#6 1.734 C:\\hello\\escaped\\path moby#6 DONE 2.1s moby#7 [4/4] RUN echo "C:\hello\quoted\path" moby#7 1.765 "C:\hello\quoted\path" moby#7 DONE 2.1s ``` Build progress after fix: ``` moby#5 [2/4] RUN echo C:\hello\world\path moby#5 1.458 C:\hello\world\path moby#5 DONE 1.8s moby#6 [3/4] RUN echo C:\\hello\\escaped\\path moby#6 1.730 C:\\hello\\escaped\\path moby#6 DONE 2.1s moby#7 [4/4] RUN echo "C:\hello\quoted\path" moby#7 1.702 "C:\hello\quoted\path" moby#7 DONE 2.1s ``` You can also see that now paths in the step/vertex names now match those in the log lines right after the name. Signed-off-by: Anthony Nandaa <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The last PR today 😄
Example output:
I'm also planning graphviz output (
buildctl dump --mode dot
) in another PR.Signed-off-by: Akihiro Suda [email protected]