You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// bpCompressionStepData contains data that the copy pipeline needs about the compression step.
73
83
typebpCompressionStepDatastruct {
74
-
operationbpcOperation// What we are actually doing
75
-
uploadedOperation types.LayerCompression// Operation to use for updating the blob metadata (matching the end state, not necessarily what we do)
76
-
uploadedAlgorithm*compressiontypes.Algorithm// An algorithm parameter for the compressionOperation edits.
77
-
uploadedAnnotationsmap[string]string// Compression-related annotations that should be set on the uploaded blob. WARNING: This is only set after the srcStream.reader is fully consumed.
78
-
srcCompressorBaseVariantNamestring// Compressor base variant name to record in the blob info cache for the source blob.
79
-
uploadedCompressorNamestring// Compressor name to record in the blob info cache for the uploaded blob.
80
-
closers []io.Closer// Objects to close after the upload is done, if any.
84
+
operationbpcOperation// What we are actually doing
85
+
uploadedOperation types.LayerCompression// Operation to use for updating the blob metadata (matching the end state, not necessarily what we do)
86
+
uploadedAlgorithm*compressiontypes.Algorithm// An algorithm parameter for the compressionOperation edits.
87
+
uploadedAnnotationsmap[string]string// Compression-related annotations that should be set on the uploaded blob. WARNING: This is only set after the srcStream.reader is fully consumed.
88
+
srcCompressorBaseVariantNamestring// Compressor base variant name to record in the blob info cache for the source blob.
89
+
uploadedCompressorBaseVariantNamestring// Compressor base variant name to record in the blob info cache for the uploaded blob.
90
+
uploadedCompressorSpecificVariantNamestring// Compressor specific variant name to record in the blob info cache for the uploaded blob.
91
+
closers []io.Closer// Objects to close after the upload is done, if any.
returncopySingleImageResult{}, errors.New("explicitly requested to combine zstd:chunked with encryption, which is not beneficial; use plain zstd instead")
// Handling of compression, encryption, and the related MIME types and the like are all the responsibility
889
890
// of the generic code in this package.
890
891
res:= types.BlobInfo{
891
-
Digest: reusedBlob.Digest,
892
-
Size: reusedBlob.Size,
893
-
URLs: nil, // This _must_ be cleared if Digest changes; clear it in other cases as well, to preserve previous behavior.
894
-
Annotations: inputInfo.Annotations, // FIXME: This should remove zstd:chunked annotations (but those annotations being left with incorrect values should not break pulls)
895
-
MediaType: inputInfo.MediaType, // Mostly irrelevant, MediaType is updated based on Compression*/CryptoOperation.
892
+
Digest: reusedBlob.Digest,
893
+
Size: reusedBlob.Size,
894
+
URLs: nil, // This _must_ be cleared if Digest changes; clear it in other cases as well, to preserve previous behavior.
895
+
// FIXME: This should remove zstd:chunked annotations IF the original was chunked and the new one isn’t
896
+
// (but those annotations being left with incorrect values should not break pulls).
897
+
Annotations: maps.Clone(inputInfo.Annotations),
898
+
MediaType: inputInfo.MediaType, // Mostly irrelevant, MediaType is updated based on Compression*/CryptoOperation.
0 commit comments