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

--progress plain results in truncated output width #1412

Closed
eedwards-sk opened this issue Mar 18, 2020 · 3 comments · Fixed by #1435
Closed

--progress plain results in truncated output width #1412

eedwards-sk opened this issue Mar 18, 2020 · 3 comments · Fixed by #1435

Comments

@eedwards-sk
Copy link

When using --progress plain, I lose valuable information in the output due to it being truncated with an ellipses (...), e.g.:

with tty:

→ ci/scripts/build
[+] Building 2.2s (17/17) FINISHED
 => importing cache manifest from my-extremely-long-private-docker-registry-address.which-gets.truncated:my-specific-tag

with plain:

→ ci/scripts/build
#1 importing cache manifest from my-extremely-long-private-docker-registry-ad...
#1 DONE 0.0s

as you can see, I lose the ability to see the tag being used when importing the cache manifest

This is very frustrating for debugging issues e.g. in CI where I'm using plain output.

@thaJeztah
Copy link
Member

I think the relevant code is here;

if modeConsole {
width, height = disp.getSize()
if done {
disp.print(t.displayInfo(), width, height, true)
t.printErrorLogs(c)
return nil
} else if displayLimiter.Allow() {
ticker.Stop()
ticker = time.NewTicker(tickerTimeout)
disp.print(t.displayInfo(), width, height, false)
}

So if there's a terminal attached, it truncates to the terminal width (if I read it correctly)

@thaJeztah
Copy link
Member

@eedwards-sk Ok, I forgot there's a PROGRESS_NO_TRUNC=1 env-var you can set to disable truncation;

PROGRESS_NO_TRUNC=1 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."
EOF

Perhaps that should be enabled by default if --progress=plain (not sure if it's used without --progress=plain though 🤔

@thaJeztah
Copy link
Member

opened #1435 for consideration

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 a pull request may close this issue.

2 participants