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 --format in manifest fetch command #1295

Merged
merged 46 commits into from
Apr 10, 2024

Conversation

qweeah
Copy link
Contributor

@qweeah qweeah commented Mar 18, 2024

What this PR does / why we need it:
This PR add --format flag to manifest fetch command to support field formatting for OCI manifests.

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

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?

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 March 18, 2024 10:07
Copy link

codecov bot commented Mar 18, 2024

Codecov Report

Attention: Patch coverage is 88.65979% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 84.46%. Comparing base (85fbdab) to head (4ec65f9).

Files Patch % Lines
...md/oras/internal/display/content/manifest_fetch.go 85.71% 1 Missing and 1 partial ⚠️
...rnal/display/metadata/descriptor/manifest_fetch.go 77.77% 1 Missing and 1 partial ⚠️
...s/internal/display/metadata/json/manifest_fetch.go 75.00% 1 Missing and 1 partial ⚠️
...ternal/display/metadata/template/manifest_fetch.go 77.77% 1 Missing and 1 partial ⚠️
cmd/oras/internal/display/utils/utils.go 77.77% 1 Missing and 1 partial ⚠️
cmd/oras/root/manifest/fetch.go 92.85% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1295      +/-   ##
==========================================
+ Coverage   84.04%   84.46%   +0.41%     
==========================================
  Files          90       97       +7     
  Lines        3467     3541      +74     
==========================================
+ Hits         2914     2991      +77     
+ Misses        331      327       -4     
- Partials      222      223       +1     

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

cmd/oras/internal/display/metadata/interface.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/fetch.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/fetch.go Show resolved Hide resolved
cmd/oras/root/manifest/fetch.go Show resolved Hide resolved
qweeah added 17 commits April 1, 2024 03:35
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>
qweeah added 10 commits April 8, 2024 06:29
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/utils/utils.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/pretty.go Show resolved Hide resolved
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/metadata/discard.go Outdated Show resolved Hide resolved
cmd/oras/root/manifest/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>
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 1494475 into oras-project:main Apr 10, 2024
8 checks passed
FeynmanZhou pushed a commit to FeynmanZhou/oras that referenced this pull request May 11, 2024
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
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.

3 participants