From 741b5b3c46bfffe8dacc43eea1d4b90d6ebfdc48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Mon, 13 Nov 2023 18:11:00 +0100 Subject: [PATCH] WIP HACK: Do not reuse zstd:chunked blobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Absolutely untested. Signed-off-by: Miloslav Trmač --- internal/imagedestination/impl/helpers.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/imagedestination/impl/helpers.go b/internal/imagedestination/impl/helpers.go index d5de81a613..5d28b3e73a 100644 --- a/internal/imagedestination/impl/helpers.go +++ b/internal/imagedestination/impl/helpers.go @@ -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()) }