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

Docker pulling progress only shown after pull has completed and not in real-time like previous versions #1598

Closed
causalnet opened this issue Sep 5, 2022 · 0 comments · Fixed by #1599
Assignees

Comments

@causalnet
Copy link
Contributor

Description

Since version 0.40.2, when pulling an image the progress bar is only shown after the pull has completed. For large downloads / slow connections, this lack of progress display can be an issue as the user won't know whether the download has frozen or if Docker is doing work. This didn't used to be the case with earlier versions of the plugin where the download progress would be displayed in real time from Docker.

e.g.

Pulling from library/postgres
#####

It looks like this change (d8befdb) is what caused the real-time progress break. In HcChunkedResponseHandlerWrapper.handleResponse() the entire body of the response from Docker is read into a ByteArrayInputStream now instead of live-streamed. So for a response that is sending back progress of a pull, this method now only returns after the pull has finished. Previously the response was live-streamed into EntityStreamReaderUtil.processJsonStream(). Looks like this was done because the body is now scanned whether it is actually JSON, where previously the headers were fully relied on.

Maybe it would be possible to still live-stream instead of buffering if the headers show the response is JSON, and only buffer the response if there is no content type header? This would allow live-progress to still work for most users.

Info

  • docker-maven-plugin version : 0.40.2
  • Maven version (mvn -v) : 3.8.6
  • Docker version : 18.09.0, also tested with 20.10.17
  • If it's a bug, how to reproduce : do anything that pulls an image, e.g. docker:start when the image is not yet pulled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant