Skip to content

Commit

Permalink
storageImageSource.LayerInfosForCopy(): return uncompressed MediaTypes
Browse files Browse the repository at this point in the history
Since #1138, we've been paying attention to the MediaType values
returned by LayerInfosForCopy(), so lying about layer data being
compressed when the data we provide isn't would cause uncompressed
layers to be mistakenly marked as compressed when we copied the image
without attempting to add or modify the compression of layers.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
  • Loading branch information
nalind authored and vrothberg committed Mar 3, 2021
1 parent 81dcd4b commit 0495207
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions storage/storage_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,7 @@ func (s *storageImageSource) LayerInfosForCopy(ctx context.Context, instanceDige
case imgspecv1.MediaTypeImageManifest:
uncompressedLayerType = imgspecv1.MediaTypeImageLayer
case manifest.DockerV2Schema1MediaType, manifest.DockerV2Schema1SignedMediaType, manifest.DockerV2Schema2MediaType:
// This is actually a compressed type, but there's no uncompressed type defined
uncompressedLayerType = manifest.DockerV2Schema2LayerMediaType
uncompressedLayerType = manifest.DockerV2SchemaLayerMediaTypeUncompressed
}

physicalBlobInfos := []types.BlobInfo{}
Expand Down

0 comments on commit 0495207

Please sign in to comment.