-
Notifications
You must be signed in to change notification settings - Fork 179
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 pulling arbitrary manifest config #480
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified on my side and functionally looks good.
@shizhMSFT Do we need to print warning if: no config media type is specified and there is already a name(title annotation) in the config descriptor? |
Recommend simplifying this to to just |
Codecov Report
@@ Coverage Diff @@
## main #480 +/- ##
=======================================
Coverage 55.69% 55.69%
=======================================
Files 6 6
Lines 237 237
=======================================
Hits 132 132
Misses 90 90
Partials 15 15 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
See
|
@lizMSFT @sajayantony @qweeah There is another option that we can rename |
How about We can still use -c for short. |
This is tricky. If you have a config file that’s for auth and config file for manifest. |
Yes, I am feeling the same. It would be better not change the name for now since it will bring breaking changes and it currently doesn't bring additional value. Besides, consumers will need to adjust accordingly, which might make them confused. |
Create a new issue for rename |
@sajayantony Let's continue the discussion in #495. |
No, we don't. |
Signed-off-by: Zoey Li <zoeyli@microsoft.com>
Signed-off-by: Zoey Li <zoeyli@microsoft.com>
Signed-off-by: Zoey Li <zoeyli@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Zoey Li <zoeyli@microsoft.com>
#274 enables the CLI to pull manifest config. However, the user must provide the desired media type of the config or use the default. This PR allows pulling arbitrary manifest config.
If the user does not specify the desired media type, the code will get the 0th indexed node as the manifest config if its parent node is a manifest.
Note: For a manifest, the 0th indexed element is always a manifest config. ref: https://github.com/oras-project/oras-go/blob/6a09a65fcc0b96c3448e988c1727ed154c2388ea/content/graph.go#L58
Examples:
Resolves: #275
Signed-off-by: Zoey Li zoeyli@microsoft.com