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

converter: make sure uncompressed digest annotation is set #2393

Merged
merged 1 commit into from
Oct 5, 2021

Conversation

ktock
Copy link
Collaborator

@ktock ktock commented Oct 5, 2021

Annotation "containerd.io/uncompressed" is required to be set for each blob descriptor and is used e.g. for creating image config.
Make sure this is set to the converted blobs so that they will be handled correctly.

@@ -191,7 +191,7 @@ func (c *conversion) convert(ctx context.Context, cs content.Store, desc ocispec
newDesc.MediaType = c.target.DefaultMediaType()
newDesc.Digest = info.Digest
newDesc.Size = info.Size
newDesc.Annotations = nil
newDesc.Annotations = map[string]string{labels.LabelUncompressed: diffID.Digest().String()}
Copy link
Member

Choose a reason for hiding this comment

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

if newDesc.Annotations == nil check in L201 can be now removed

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
@ktock ktock force-pushed the converter-uncompressed-annotation branch from ab8811f to 5c27a53 Compare October 5, 2021 06:02
@tonistiigi tonistiigi merged commit 91ecc99 into moby:master Oct 5, 2021
@ktock ktock deleted the converter-uncompressed-annotation branch October 6, 2021 00:08
@crazy-max crazy-max added this to the v0.10.0 milestone Feb 4, 2022
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.

4 participants