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

pkg/oci: Few cleanups and improvements to make code clearer #2585

Merged
merged 6 commits into from
Mar 11, 2024

Conversation

blanquicet
Copy link
Member

@blanquicet blanquicet commented Mar 6, 2024

It doesn't change the integration with other modules, so rebasing refactoring on top of this is fast-forward. cc @flyth

Signed-off-by: Jose Blanquicet <josebl@microsoft.com>
GetIndex doesn't need to be exposed as we have a grapper for this that
returns directly the manifest for the host: GetManifestForHost.

Signed-off-by: Jose Blanquicet <josebl@microsoft.com>
Signed-off-by: Jose Blanquicet <josebl@microsoft.com>
Signed-off-by: Jose Blanquicet <josebl@microsoft.com>
getContentFromDescriptor and GetContentFromDescriptor do the same but
one returns []byte and the other a ReadCloser. Make clear the difference
in the name.

Signed-off-by: Jose Blanquicet <josebl@microsoft.com>
Size will never be 0 because we are using the DescriptorEmptyJSON when
the metadata file is not provided. And DescriptorEmptyJSON has size 2.

Signed-off-by: Jose Blanquicet <josebl@microsoft.com>
Copy link
Member

@flyth flyth left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@blanquicet blanquicet merged commit 1ea3f17 into main Mar 11, 2024
59 checks passed
@blanquicet blanquicet deleted the jose/oci-improvements branch March 11, 2024 12:44
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.

None yet

2 participants