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: add command to get the digest of a tagged manifest without parsing output #1034

Closed
wants to merge 4 commits into from

Conversation

amands98
Copy link
Contributor

Note :
I will add the description shortly.

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

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?

…tput

Signed-off-by: amands98 <amandeepsm.in@gmail.com>
@codecov-commenter
Copy link

Codecov Report

Merging #1034 (9e83417) into main (4b9ffea) will decrease coverage by 0.73%.
The diff coverage is 29.26%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main    #1034      +/-   ##
==========================================
- Coverage   81.28%   80.56%   -0.73%     
==========================================
  Files          57       58       +1     
  Lines        2907     2948      +41     
==========================================
+ Hits         2363     2375      +12     
- Misses        371      399      +28     
- Partials      173      174       +1     
Impacted Files Coverage Δ
cmd/oras/root/resolve.go 27.50% <27.50%> (ø)
cmd/oras/root/cmd.go 100.00% <100.00%> (ø)

Args: cobra.ExactArgs(1),
Aliases: []string{"digest"},
PreRunE: func(cmd *cobra.Command, args []string) error {
opts.RawReference = args[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

Should validate the reference is in form of <name>:<tag>

var opts resolveOptions

cmd := &cobra.Command{
Use: "resolve [flags] <name>:<tag>",
Copy link
Contributor

Choose a reason for hiding this comment

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

This command should be experimental, please check how other commands do it, e.g. oras discover

cmd/oras/root/resolve.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.

Also we need E2E tests, @amands98 can you add some for this command via following https://github.com/oras-project/oras/blob/main/test/e2e/README.md

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.

Since this command is new, we should mark it as experimental.

Co-authored-by: Billy Zha <qweeah@gmail.com>
Signed-off-by: Aman <136564604+amands98@users.noreply.github.com>
@github-actions
Copy link

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the stale Inactive issues or pull requests label Sep 14, 2023
@TerryHowe TerryHowe removed the stale Inactive issues or pull requests label Sep 14, 2023
@github-actions
Copy link

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the stale Inactive issues or pull requests label Oct 30, 2023
Signed-off-by: Terry Howe <tlhowe@amazon.com>
@github-actions github-actions bot removed the stale Inactive issues or pull requests label Oct 31, 2023
@sajayantony
Copy link
Contributor

Would love to get command before we release 1.2. @amands98 do you need help to finish this up?

@sajayantony
Copy link
Contributor

Leaving this here since I think there have been multiple users who have wanted this command - #1187

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.

add command to get the digest of a tagged manifest without parsing output
6 participants