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: status, metadata and content handlers for manifest index commands #1509

Merged
merged 28 commits into from
Nov 14, 2024

Conversation

wangxiaoxuan273
Copy link
Contributor

@wangxiaoxuan273 wangxiaoxuan273 commented Sep 24, 2024

What this PR does / why we need it:
Implements output handlers for manifest index 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 #1503

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 5 commits September 24, 2024 10:39
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
@wangxiaoxuan273 wangxiaoxuan273 changed the title Output output refactor: status, metadata and content handlers for manifest index commands Sep 24, 2024
Copy link

codecov bot commented Sep 24, 2024

Codecov Report

Attention: Patch coverage is 82.52427% with 36 lines in your changes missing coverage. Please review.

Project coverage is 83.96%. Comparing base (b4be9a6) to head (2f1dd59).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/oras/root/manifest/index/update.go 61.11% 14 Missing and 7 partials ⚠️
cmd/oras/root/manifest/index/create.go 50.00% 10 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1509      +/-   ##
==========================================
- Coverage   83.99%   83.96%   -0.04%     
==========================================
  Files         118      119       +1     
  Lines        5174     5306     +132     
==========================================
+ Hits         4346     4455     +109     
- Misses        588      604      +16     
- Partials      240      247       +7     

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

Xiaoxuan Wang added 3 commits September 24, 2024 17:04
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
cmd/oras/root/manifest/index/create.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/content/manifest_index.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/metadata/discard.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/metadata/discard.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/metadata/interface.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/status/interface.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/status/interface.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/status/interface.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/handler.go Show resolved Hide resolved
cmd/oras/root/manifest/index/update.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/content/manifest_index.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/handler.go Show resolved Hide resolved
cmd/oras/internal/display/status/text.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/status/text.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/update.go Outdated Show resolved Hide resolved
Signed-off-by: Xiaoxuan Wang <[email protected]>
Xiaoxuan Wang added 5 commits October 9, 2024 15:01
cmd/oras/internal/display/metadata/text/manifest_index.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/metadata/interface.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/handler.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/status/utils.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/index/create.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/content/discard.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/content/manifest_index.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/metadata/discard.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/metadata/interface.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/status/interface.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/status/utils.go Outdated Show resolved Hide resolved
@wangxiaoxuan273
Copy link
Contributor Author

As per offline discussion, added, merged, removed, pushed, packed should exist in both status and metadata output. And Status output is needed in the PR, metadata output can be added in a future pr when needed.

Xiaoxuan Wang added 2 commits October 21, 2024 15:24
Signed-off-by: Xiaoxuan Wang <[email protected]>
cmd/oras/internal/display/handler.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/handler.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/status/text.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/status/text.go Outdated Show resolved Hide resolved
cmd/oras/internal/display/status/text.go Outdated Show resolved Hide resolved
Xiaoxuan Wang added 7 commits October 29, 2024 09:46
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
@qweeah qweeah self-requested a review November 12, 2024 02:51
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

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 e6a3eee into oras-project:main Nov 14, 2024
8 checks passed
@wangxiaoxuan273 wangxiaoxuan273 deleted the output-output branch November 27, 2024 06:45
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.

oras manifest index create/update --output - should hide other stdout output
4 participants