From 291a4660610ec7b31f52be03ec2a3527820ae159 Mon Sep 17 00:00:00 2001 From: Natalie Arellano Date: Wed, 23 Aug 2023 09:54:12 -0400 Subject: [PATCH] Don't print 'Ignoring cache image "cache-image-name" because it was corrupt' (#1185) when the cache image is not found Signed-off-by: Natalie Arellano --- cache/image_cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache/image_cache.go b/cache/image_cache.go index e82633d58..09a81bbda 100644 --- a/cache/image_cache.go +++ b/cache/image_cache.go @@ -77,7 +77,7 @@ func (c *ImageCache) SetMetadata(metadata platform.CacheMetadata) error { } func (c *ImageCache) RetrieveMetadata() (platform.CacheMetadata, error) { - if !c.origImage.Valid() { + if c.origImage.Found() && !c.origImage.Valid() { c.logger.Infof("Ignoring cache image %q because it was corrupt", c.origImage.Name()) return platform.CacheMetadata{}, nil }