Provide progress feedback and image size in imgpkg push
Closed this issue · 2 comments
Describe the problem/challenge you have
We use imgpkg as library, and while using imgpkg push to upload a source bundle to a registry, sometimes it takes a while for the image to upload if the image size if large. We would like to show a progress bar to show the progress similar to imgpkg copy to show the user that the progress is made.
Describe the solution you'd like
Add a progress bar to show the progress being made and the image size as if it were an uploading data file. "305k/3000k - 10% ETA 30 seconds" this information is considered useful because it shows how much has been uploaded, how much must be uploaded, expresses that as a percentage for simplicity, and then shows the expected time it will complete.
Anything else you would like to add:
I was able to achieve the output progress bar same as that of imgpkg copy in imgpkg push by using registrywithprogress and the multiwrite function in imgpkg/plainimage/contents.go line # 49 (instead of writer.WriteImage), as the multi write already creates the channel to which updates will be sent while a transfer is in progress and log the same. However, I think the solution is to implement the progress logger for writeImage, same as that of MultiWrite.
Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help work on this issue.
I think it is a good improvement for our API side, for now, I believe that this change should only be done at API level. Not sure if we want to display the progress bar in imgpkg cli for single images, but with this functionality, I think we would be set for success if we want to do it.
Changing the WriteImage
function from the Repository to add the ability to provide a channel to get the updates of the upload does sound like the best way to go(there are quite a number of interfaces that will have to be changed, but the best option nevertheless).
Going to accept this issue
This issue was solved in release 0.30.0