Skip to content

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

Merged
qweeah merged 80 commits into
oras-project:mainfrom
qweeah:progress-bar-reader
Oct 13, 2023
Merged

feat: support progressed output in blob push and blob get#1113
qweeah merged 80 commits into
oras-project:mainfrom
qweeah:progress-bar-reader

Conversation

@qweeah

@qweeah qweeah commented Sep 11, 2023

Copy link
Copy Markdown
Contributor

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

codecov-commenter commented Sep 11, 2023

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 81.71021% with 77 lines in your changes missing coverage. Please review.

Project coverage is 80.78%. Comparing base (20c06d6) to head (edf7ab8).
Report is 238 commits behind head on main.

Files with missing lines Patch % Lines
cmd/oras/internal/display/progress/manager.go 78.48% 13 Missing and 4 partials ⚠️
cmd/oras/root/blob/fetch.go 62.22% 11 Missing and 6 partials ⚠️
cmd/oras/internal/display/track/reader.go 73.33% 8 Missing and 4 partials ⚠️
...as/internal/display/console/testutils/testutils.go 70.00% 6 Missing and 3 partials ⚠️
cmd/oras/root/blob/push.go 68.96% 6 Missing and 3 partials ⚠️
cmd/oras/internal/display/progress/status.go 95.08% 4 Missing and 2 partials ⚠️
...d/oras/internal/display/progress/humanize/bytes.go 80.95% 3 Missing and 1 partial ⚠️
cmd/oras/internal/display/console/console.go 91.42% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1113      +/-   ##
==========================================
+ Coverage   80.06%   80.78%   +0.72%     
==========================================
  Files          57       64       +7     
  Lines        2994     3372     +378     
==========================================
+ Hits         2397     2724     +327     
- Misses        412      447      +35     
- Partials      185      201      +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@qweeah qweeah force-pushed the progress-bar-reader branch from 753b47e to 4c5e2f1 Compare September 12, 2023 07:06
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
@qweeah qweeah force-pushed the progress-bar-reader branch from 4c5e2f1 to b088f2b Compare September 12, 2023 07:06
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
Comment thread cmd/oras/internal/display/console/console.go Outdated
Comment thread cmd/oras/internal/display/console/console.go Outdated
Comment thread cmd/oras/internal/display/console/console.go Outdated
Comment thread cmd/oras/internal/display/console/console.go Outdated
Comment thread cmd/oras/internal/display/console/console.go Outdated
Comment thread cmd/oras/internal/display/progress/manager.go Outdated
Comment thread cmd/oras/internal/display/progress/manager.go Outdated
Comment thread cmd/oras/internal/display/progress/mark.go Outdated
Comment thread cmd/oras/internal/display/progress/manager.go
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 added 2 commits October 9, 2023 05:59
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Comment thread cmd/oras/internal/display/progress/humanize.go
Comment thread cmd/oras/internal/display/progress/humanize.go Outdated
Comment thread cmd/oras/internal/display/progress/humanize.go Outdated
Comment thread cmd/oras/internal/display/progress/humanize.go
Comment thread cmd/oras/internal/display/console/testutils/testutils.go
Comment thread cmd/oras/internal/display/progress/status.go
Comment thread cmd/oras/internal/display/track/reader.go Outdated
Comment thread cmd/oras/internal/option/common.go Outdated
Comment thread cmd/oras/root/blob/fetch.go Outdated
Comment thread cmd/oras/root/blob/push.go Outdated
qweeah added 16 commits October 10, 2023 11:45
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>
Comment thread cmd/oras/root/blob/push.go
Comment thread cmd/oras/internal/display/progress/status.go Outdated
Comment thread cmd/oras/root/blob/fetch.go Outdated
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>

@shizhMSFT shizhMSFT left a comment

Copy link
Copy Markdown
Contributor

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
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