carvel-dev / imgpkg

Store application configuration files in Docker/OCI registries
https://carvel.dev/imgpkg
Apache License 2.0
261 stars 61 forks source link

Is there any way to disable progress bar shown during pushing of images ? #666

Closed tarun818 closed 2 months ago

tarun818 commented 3 months ago

I am using below snippet in my code base to push images

`// Create a CopyOptions object for imgpkg's copyOptions.Run() copyOptions := imgpkg.NewCopyOptions(goUi.NewConfUI(goUi.NewNoopLogger())) //... //... // Set fields according to parameters and default imgpkg configurations, as well as registry auth copyOptions.RepoDst = copyOptions.Concurrency = 1 //... and so on and finally, I call Run as shown below

copyOptions.Run() ` This copyOptions.Run() will start a progress bar as shown here

I want to disable it. is this possible ?

praveenrewar commented 3 months ago

@tarun818 I don't think there's a way to disable the progress bar while using the Run function. Unfortunately we don't have apis for the copy command yet which would have been helpful here.

cc @joaopapereira

joaopapereira commented 3 months ago

Hey I am currently working on extracting the API for copy. Unfortunately, I do not have a lot of bandwidth to do it. When we extract it, it would be easier for you to call imgpkg.

tarun818 commented 3 months ago

@joaopapereira Thanks for your response. If possible, can you share a tentative timeline for when we can expect this change?

joaopapereira commented 3 months ago

I created a PR that will add the v1 API for copy https://github.com/carvel-dev/imgpkg/pull/668. There is another PR that is being reviewed that does change the code in copy and we need to decide if we want to merge this first and add rebase that PR or the reverse.

praveenrewar commented 2 months ago

The PR is merged. @tarun818 Could you give the copy apis a try now (we haven't made a release yet but you should be able to use the latest commit sha).