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

feat: support progressed output in blob push and blob get #1113

Merged
merged 80 commits into from
Oct 13, 2023

Conversation

qweeah
Copy link
Contributor

@qweeah qweeah commented Sep 11, 2023

What this PR does / why we need it:
This PR introduces terminal output for certain oras commands.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #893

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

@codecov-commenter
Copy link

codecov-commenter commented Sep 11, 2023

Codecov Report

Merging #1113 (223eede) into main (20c06d6) will increase coverage by 0.59%.
The diff coverage is 80.56%.

❗ Current head 223eede differs from pull request most recent head edf7ab8. Consider uploading reports for the commit edf7ab8 to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##             main    #1113      +/-   ##
==========================================
+ Coverage   80.06%   80.65%   +0.59%     
==========================================
  Files          57       64       +7     
  Lines        2994     3376     +382     
==========================================
+ Hits         2397     2723     +326     
- Misses        412      451      +39     
- Partials      185      202      +17     
Files Coverage Δ
cmd/oras/internal/display/progress/spinner.go 100.00% <100.00%> (ø)
cmd/oras/internal/option/common.go 100.00% <100.00%> (ø)
cmd/oras/internal/display/console/console.go 91.42% <91.42%> (ø)
...d/oras/internal/display/progress/humanize/bytes.go 80.95% <80.95%> (ø)
cmd/oras/internal/display/progress/status.go 95.08% <95.08%> (ø)
...as/internal/display/console/testutils/testutils.go 70.00% <70.00%> (ø)
cmd/oras/root/blob/push.go 86.11% <68.96%> (+2.41%) ⬆️
cmd/oras/internal/display/track/reader.go 73.33% <73.33%> (ø)
cmd/oras/internal/display/progress/manager.go 78.48% <78.48%> (ø)
cmd/oras/root/blob/fetch.go 68.29% <52.17%> (+0.02%) ⬆️

... and 1 file with indirect coverage changes

Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
@qweeah qweeah marked this pull request as ready for review September 21, 2023 08:28
cmd/oras/internal/display/console/console.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/console/console.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/console/console.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/console/console.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/console/console.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/progress/manager.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/progress/manager.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/progress/mark.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/progress/manager.go Show resolved Hide resolved
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
cmd/oras/internal/display/progress/humanize.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/progress/humanize.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/progress/humanize.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/progress/humanize.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/progress/status.go Show resolved Hide resolved
cmd/oras/internal/display/track/reader.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/common.go Outdated Show resolved Hide resolved
cmd/oras/root/blob/fetch.go Outdated Show resolved Hide resolved
cmd/oras/root/blob/push.go Outdated Show resolved Hide resolved
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
cmd/oras/root/blob/push.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/progress/status.go Outdated Show resolved Hide resolved
cmd/oras/root/blob/fetch.go Outdated Show resolved Hide resolved
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qweeah qweeah merged commit f9bb6d8 into oras-project:main Oct 13, 2023
6 checks passed
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

Successfully merging this pull request may close these issues.

Show progress bar when downloading or pushing content from/to a registry
4 participants