Skip to content

Commit

Permalink
WIP HACK: Do not reuse zstd:chunked blobs
Browse files Browse the repository at this point in the history
Absolutely untested.

Signed-off-by: Miloslav Trmač <[email protected]>
  • Loading branch information
mtrmac committed Nov 13, 2023
1 parent c951e83 commit 741b5b3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/imagedestination/impl/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ func BlobMatchesRequiredCompression(options private.TryReusingBlobOptions, candi
if options.RequiredCompression == nil {
return true // no requirement imposed
}
if options.RequiredCompression.Name() == compression.ZstdChunkedAlgorithmName {
// HACK: Never match when the caller asks for zstd:chunked, because we don’t record the annotations required to use the chunked blobs.
// The caller must re-compress to build those annotations.
return false
}
return candidateCompression != nil && (options.RequiredCompression.Name() == candidateCompression.Name())
}

Expand Down

0 comments on commit 741b5b3

Please sign in to comment.