From d9cdaf8003b2e322964caed2c2faaace0ed12df2 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Wed, 13 Mar 2019 16:01:42 -0700 Subject: [PATCH] remotecache: allow uncompressed digest in inline export Signed-off-by: Tonis Tiigi --- cache/remotecache/inline/inline.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cache/remotecache/inline/inline.go b/cache/remotecache/inline/inline.go index 39ca3535..4ce7de87 100644 --- a/cache/remotecache/inline/inline.go +++ b/cache/remotecache/inline/inline.go @@ -41,6 +41,13 @@ func (ce *exporter) ExportForLayers(layers []digest.Digest) ([]byte, error) { for _, k := range layers { if v, ok := descs[k]; ok { descs2[k] = v + continue + } + // fallback for uncompressed digests + for _, v := range descs { + if uc := v.Descriptor.Annotations["containerd.io/uncompressed"]; uc == string(k) { + descs2[v.Descriptor.Digest] = v + } } }