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 configurable subject pulling #689

Merged
merged 12 commits into from
Dec 14, 2022

Conversation

qweeah
Copy link
Contributor

@qweeah qweeah commented Nov 14, 2022

Resolves #681

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/pull.go Outdated Show resolved Hide resolved
cmd/oras/pull.go Outdated
@@ -84,6 +89,7 @@ Example - Pull all files with concurrency level tuned:

cmd.Flags().BoolVarP(&opts.KeepOldFiles, "keep-old-files", "k", false, "do not replace existing files when pulling, treat them as errors")
cmd.Flags().BoolVarP(&opts.PathTraversal, "allow-path-traversal", "T", false, "allow storing files out of the output directory")
cmd.Flags().BoolVarP(&opts.IncludeSubject, "include-subject", "", false, "download files recursively from subject images/artifacts")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
cmd.Flags().BoolVarP(&opts.IncludeSubject, "include-subject", "", false, "download files recursively from subject images/artifacts")
cmd.Flags().BoolVarP(&opts.IncludeSubject, "include-subject", "", false, "recursively pull the subject of artifacts")

@codecov-commenter
Copy link

codecov-commenter commented Nov 14, 2022

Codecov Report

Merging #689 (3f20126) into main (b89736e) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #689   +/-   ##
=======================================
  Coverage   72.12%   72.12%           
=======================================
  Files          14       14           
  Lines         513      513           
=======================================
  Hits          370      370           
  Misses        114      114           
  Partials       29       29           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

cmd/oras/pull.go Outdated
@@ -84,6 +89,7 @@ Example - Pull all files with concurrency level tuned:

cmd.Flags().BoolVarP(&opts.KeepOldFiles, "keep-old-files", "k", false, "do not replace existing files when pulling, treat them as errors")
cmd.Flags().BoolVarP(&opts.PathTraversal, "allow-path-traversal", "T", false, "allow storing files out of the output directory")
cmd.Flags().BoolVarP(&opts.IncludeSubject, "include-subject", "", false, "download files recursively the subject of artifacts")
Copy link
Contributor

Choose a reason for hiding this comment

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

error: invalid grammar

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

@shizhMSFT
Copy link
Contributor

Let's merge after the release of v0.16.1.

@sajayantony
Copy link
Contributor

sajayantony commented Nov 15, 2022

I was hoping this would be there in the next release. The pulling of all related content is a bit confusing to be honest when you want to just pull the attached SBOM.

@FeynmanZhou
Copy link
Member

I was hoping this would be there in the next release. The pulling of all related content is a bit confusing to be honest when you want to just pull the attached SBOM.

@sajayantony Agree, I think this PR is a breaking change that has changed the default behavior of oras pull. So it is more reasonable to bring it in the RC.1 instead of a patch release (v0.16.1).

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 qweeah self-assigned this Nov 23, 2022
@qweeah qweeah added the enhancement New feature or request label Nov 23, 2022
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

@shizhMSFT
Copy link
Contributor

Merging to main since we can cherry-pick fixes to release-0.16 branch if we need to release 0.16.1.

@shizhMSFT shizhMSFT merged commit 380c845 into oras-project:main Dec 14, 2022
TerryHowe pushed a commit to TerryHowe/oras that referenced this pull request Feb 2, 2023
Resolves oras-project#681 

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
enhancement New feature or request
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

ORAS should disable pulling subject when pulling an artifact/image manifest with subject
5 participants