Skip to content

Show progress bar when downloading or pushing content from/to a registry #893

Closed

Description

@FeynmanZhou

What is the version of your ORAS CLI

v1.0.0-RC.2

What would you like to be added?

Per the discussion at ORAS slack channel, @vsoch suggests design and provide a progress bar when downloading content from the remote registry.

Why is this needed for ORAS?

It would be helpful to show the progress bar in ORAS CLI commands such as oras blob fetch, especially when downloading a big layer or blob. Sometimes, the file transfer might be stuck but users are not aware of the progress. If ORAS output displays no output for a while, it will look broken. A good spinner or progress bar/indicator can make a CLI appear to be easier to use. It’s also good to show the estimated time remaining, or even just have an animated component, to reassure them that you’re still working on it.

Similarly, we could also add a progress bar to the push scenario. This would be a UX improvement.

Are you willing to submit PRs to contribute to this feature?

  • Yes, I am willing to implement it.

Activity

  1. added
    enhancement
    good first issue
    on Mar 17, 2023
  2. added this to the future milestone on Mar 22, 2023
  3. removed
    good first issue
    on Mar 22, 2023
  4. shizhMSFT commented on Mar 22, 2023

    @shizhMSFT
    Contributor

    Although we don't have a progress bar implemented for oras yet, it is possible with jq and pv. Here's an example:

    $ blob_ref=ghcr.io/oras-project/oras@sha256:74529e03eae02d1fff5c05e9a6ec2089e1f5ae96421169c29a7c165346e042e4
    $ size=$(oras blob fetch --descriptor $blob_ref | jq -r .size)
    $ oras blob fetch $blob_ref --output - | pv -s $size > layer.bin
    1.58MiB 0:00:03 [1.47MiB/s] [================================>                                ] 45% ETA 0:00:03
  5. modified the milestones: future, v2.0.0 on Jun 5, 2023
  6. sbdtu5498 commented on Jun 27, 2023

    @sbdtu5498

    How about using https://github.com/schollz/progressbar rather than depending on external utility. I have done the basic changes for the issue. Should we also implement the same for blob push as well. I will make the PR, just let me know.

  7. iambahmanop commented on Jul 21, 2023

    @iambahmanop
    Contributor

    I am interested in working on this. // @sajayantony @FeynmanZhou @qweeah

  8. self-assigned this
    on Jul 23, 2023
  9. qweeah commented on Jul 23, 2023

    @qweeah
    Contributor
  10. qweeah commented on Jul 23, 2023

    @qweeah
    Contributor

    How about using https://github.com/schollz/progressbar rather than depending on external utility. I have done the basic changes for the issue. Should we also implement the same for blob push as well. I will make the PR, just let me know.

    It contains <1.0 dependencies which we want to avoid.

  11. modified the milestones: v2.0.0, v1.2.0 on Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementlogging

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions