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

fix: support fetching manifest in oci image layout #766

Merged
merged 2 commits into from
Jan 29, 2023

Conversation

qweeah
Copy link
Contributor

@qweeah qweeah commented Jan 28, 2023

Resolves #764

Signed-off-by: Billy Zha [email protected]

@qweeah qweeah marked this pull request as ready for review January 28, 2023 03:45
@codecov-commenter
Copy link

codecov-commenter commented Jan 28, 2023

Codecov Report

Merging #766 (36fdf0e) into main (735ce35) will not change coverage.
The diff coverage is n/a.

📣 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)
Copy link

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?

Copy link
Contributor Author

@qweeah qweeah Jan 28, 2023

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.

Copy link
Contributor Author

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.

if err != nil {
return err
return fmt.Errorf("failed to find %q in %q: %w", opts.Reference, opts.RawReference, err)
Copy link
Contributor

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]>
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 shizhMSFT merged commit 3d36225 into oras-project:main Jan 29, 2023
TerryHowe pushed a commit to TerryHowe/oras that referenced this pull request Feb 2, 2023
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.

oras manifest fetch fails on oci image layout target
4 participants