-
Notifications
You must be signed in to change notification settings - Fork 181
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
fix: support fetching manifest in oci image layout #766
Conversation
Signed-off-by: Billy Zha <[email protected]>
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #766 +/- ##
=======================================
Coverage 63.86% 63.86%
=======================================
Files 19 19
Lines 714 714
=======================================
Hits 456 456
Misses 225 225
Partials 33 33 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@@ -113,18 +114,18 @@ func fetchManifest(opts fetchOptions) (fetchErr error) { | |||
// fetch manifest descriptor only | |||
fetchOpts := oras.DefaultResolveOptions | |||
fetchOpts.TargetPlatform = opts.Platform.Platform | |||
desc, err = oras.Resolve(ctx, src, opts.RawReference, fetchOpts) | |||
desc, err = oras.Resolve(ctx, src, opts.Reference, fetchOpts) |
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.
Are there any tests that need to be updated or added that validate this functionality?
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.
There is no test for now & indeed, E2E tests should be added to cover this.
OCI image layout support is a new feature and tests are not there yet. Let me open an issue for tracking.
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.
Added an issue #767, it should be done before 1.0.0 release.
cmd/oras/manifest/fetch.go
Outdated
if err != nil { | ||
return err | ||
return fmt.Errorf("failed to find %q in %q: %w", opts.Reference, opts.RawReference, err) |
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.
What will this error message look like? It seems that it contains duplicated messages.
Signed-off-by: Billy Zha <[email protected]>
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
Resolves oras-project#764 Signed-off-by: Billy Zha <[email protected]>
Resolves #764
Signed-off-by: Billy Zha [email protected]