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

refactor: add handlers to manifest push commmand #1555

Merged
merged 20 commits into from
Dec 16, 2024

Conversation

wangxiaoxuan273
Copy link
Contributor

@wangxiaoxuan273 wangxiaoxuan273 commented Nov 29, 2024

What this PR does / why we need it:

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

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?

Xiaoxuan Wang added 2 commits November 29, 2024 15:51
@wangxiaoxuan273 wangxiaoxuan273 changed the title Push handler refactor: add handlers to manifest push commmand Nov 29, 2024
Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 81.39535% with 8 lines in your changes missing coverage. Please review.

Project coverage is 84.33%. Comparing base (840f82e) to head (5c3721a).

Files with missing lines Patch % Lines
cmd/oras/root/manifest/push.go 40.00% 2 Missing and 4 partials ⚠️
cmd/oras/internal/display/metadata/discard.go 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1555      +/-   ##
==========================================
+ Coverage   84.30%   84.33%   +0.03%     
==========================================
  Files         120      120              
  Lines        5416     5446      +30     
==========================================
+ Hits         4566     4593      +27     
- Misses        604      606       +2     
- Partials      246      247       +1     

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

Signed-off-by: Xiaoxuan Wang <[email protected]>
@wangxiaoxuan273 wangxiaoxuan273 marked this pull request as ready for review December 3, 2024 02:21
@qweeah
Copy link
Contributor

qweeah commented Dec 3, 2024

@wangxiaoxuan273 Can you help resolve the conflict?

Xiaoxuan Wang added 3 commits December 3, 2024 10:56
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
cmd/oras/internal/display/status/interface.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/status/text.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/handler.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/status/interface.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/push.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/status/interface.go Outdated Show resolved Hide resolved
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.

Please follow @qweeah's comments

Xiaoxuan Wang added 4 commits December 4, 2024 10:56
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
cmd/oras/internal/display/handler.go Show resolved Hide resolved
cmd/oras/internal/display/metadata/text/manifest_push.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/metadata/text/manifest_push.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/metadata/text/manifest_push.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/status/utils.go Outdated Show resolved Hide resolved
Copy link
Contributor

@qweeah qweeah left a comment

Choose a reason for hiding this comment

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

No need to reset printer.Verbose in the command code, remove opts.Printer.Verbose = opts.verbose && !opts.OutputDescriptor in the RunE

cmd/oras/internal/display/status/interface.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/push.go Outdated Show resolved Hide resolved
Xiaoxuan Wang added 3 commits December 16, 2024 14:57
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Copy link
Contributor

@qweeah qweeah 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 245b141 into oras-project:main Dec 16, 2024
8 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.

4 participants