Skip to content

refactor: add handlers to manifest push commmand#1555

Merged
qweeah merged 20 commits into
oras-project:mainfrom
wangxiaoxuan273:push-handler
Dec 16, 2024
Merged

refactor: add handlers to manifest push commmand#1555
qweeah merged 20 commits into
oras-project:mainfrom
wangxiaoxuan273:push-handler

Conversation

@wangxiaoxuan273

@wangxiaoxuan273 wangxiaoxuan273 commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

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
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
@wangxiaoxuan273 wangxiaoxuan273 changed the title Push handler refactor: add handlers to manifest push commmand Nov 29, 2024
@codecov

codecov Bot commented Nov 29, 2024

Copy link
Copy Markdown

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).
Report is 97 commits behind head on main.

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
@wangxiaoxuan273 wangxiaoxuan273 marked this pull request as ready for review December 3, 2024 02:21
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
@qweeah

qweeah commented Dec 3, 2024

Copy link
Copy Markdown
Contributor

@wangxiaoxuan273 Can you help resolve the conflict?

Xiaoxuan Wang added 3 commits December 3, 2024 10:56
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
Comment thread cmd/oras/internal/display/status/interface.go Outdated
Comment thread cmd/oras/internal/display/status/text.go Outdated
Comment thread cmd/oras/internal/display/handler.go Outdated
Comment thread cmd/oras/internal/display/status/interface.go Outdated
Comment thread cmd/oras/root/manifest/push.go Outdated
Comment thread cmd/oras/internal/display/status/interface.go Outdated

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

Please follow @qweeah's comments

Xiaoxuan Wang added 4 commits December 4, 2024 10:56
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
Comment thread cmd/oras/internal/display/handler.go
Comment thread cmd/oras/internal/display/metadata/text/manifest_push.go Outdated
Comment thread cmd/oras/internal/display/metadata/text/manifest_push.go Outdated
Comment thread cmd/oras/internal/display/metadata/text/manifest_push.go Outdated
Comment thread cmd/oras/internal/display/status/utils.go Outdated
Comment thread cmd/oras/root/manifest/push.go Outdated
Xiaoxuan Wang added 6 commits December 6, 2024 11:22
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
fix
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>

@qweeah qweeah 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.

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

Comment thread cmd/oras/internal/display/status/interface.go Outdated
Comment thread cmd/oras/root/manifest/push.go Outdated
Xiaoxuan Wang added 3 commits December 16, 2024 14:57
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>

@qweeah qweeah 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 245b141 into oras-project:main Dec 16, 2024
@wangxiaoxuan273 wangxiaoxuan273 deleted the push-handler branch February 5, 2025 07:20
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