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

Show progress for docker commands #9

Open
jyn514 opened this issue Oct 25, 2019 · 5 comments
Open

Show progress for docker commands #9

jyn514 opened this issue Oct 25, 2019 · 5 comments

Comments

@jyn514
Copy link
Member

jyn514 commented Oct 25, 2019

When building a crate for docs.rs, I get the following output, followed by 15 minutes without anything happening:

2019/10/25 01:20:53 [INFO] rustwide::cmd::sandbox: pulling image rustops/crates-build-env from Docker Hub
2019/10/25 01:20:53 [INFO] rustwide::cmd: running `"docker" "pull" "rustops/crates-build-env"`
2019/10/25 01:20:55 [INFO] rustwide::cmd: [stdout] Using default tag: latest
2019/10/25 01:20:56 [INFO] rustwide::cmd: [stdout] latest: Pulling from rustops/crates-build-env
2019/10/25 01:20:56 [INFO] rustwide::cmd: [stdout] 5667fdb72017: Already exists
2019/10/25 01:20:56 [INFO] rustwide::cmd: [stdout] d83811f270d5: Already exists
2019/10/25 01:20:56 [INFO] rustwide::cmd: [stdout] ee671aafb583: Already exists
2019/10/25 01:20:56 [INFO] rustwide::cmd: [stdout] 7fc152dfb3a6: Already exists
2019/10/25 01:20:56 [INFO] rustwide::cmd: [stdout] 5c0b1d519321: Pulling fs layer
2019/10/25 01:20:56 [INFO] rustwide::cmd: [stdout] 4f2b8f293757: Pulling fs layer
2019/10/25 01:20:56 [INFO] rustwide::cmd: [stdout] 2fa8e23f28c7: Pulling fs layer
2019/10/25 01:20:57 [INFO] rustwide::cmd: [stdout] 5c0b1d519321: Verifying Checksum
2019/10/25 01:20:57 [INFO] rustwide::cmd: [stdout] 5c0b1d519321: Download complete
2019/10/25 01:20:57 [INFO] rustwide::cmd: [stdout] 2fa8e23f28c7: Download complete
2019/10/25 01:20:57 [INFO] rustwide::cmd: [stdout] 5c0b1d519321: Pull complete

If I run docker pull rustops/crates-build-env manually on the host machine, I can see that it's trying to download a 1.3 GB image, which takes quite a while on my internet connection. Would it be possible to show this progress in rustwide so it doesn't seem like nothing is happening?

@jyn514
Copy link
Member Author

jyn514 commented Oct 25, 2019

Same request when rustup is downloading components.

@pietroalbini
Copy link
Member

Hmm, it's a bit hard to do that, as neither of those programs output the progress bar when not running under a tty. Docker could probably be solved by using the API (#7) and implementing the progress bar ourselves, but I'm not sure how to do that for rustup.

@jyn514
Copy link
Member Author

jyn514 commented Dec 30, 2019

As a workaround, could rustwide unconditionally print 'still running <command>' every 1-5 minutes, the same way that cargo test prints 'still running after 60 seconds'?

@regexident
Copy link
Contributor

Even just adding a "The next steps might take a while. Hang tight!" right before starting docker tasks that are known to run for a while would still be better than just "hanging" for minutes, I think.

Providing an actual progress would be even better, of course. But either way would be an improvement to the status quo.

@jyn514
Copy link
Member Author

jyn514 commented May 3, 2021

This should be a lot better after rust-lang/docs.rs#1360.

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

No branches or pull requests

3 participants