From 473b1de3ec4af7096271ecbfb50aa4ff60e8585c Mon Sep 17 00:00:00 2001 From: Igal Tsoiref Date: Wed, 29 Jan 2025 17:03:33 +0200 Subject: [PATCH] NO-ISSUE: in some registries (brew for example) we can get a redirect to another registry that doesn't have this specific image manifest and we will get manifest-unknown error and will not retry to pull it, removing this pretty small optimisation will allow us to retry in this case and make our code more error resilient --- internal/precache/workload/pullImages.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/internal/precache/workload/pullImages.go b/internal/precache/workload/pullImages.go index 1bce881db..95b687d93 100644 --- a/internal/precache/workload/pullImages.go +++ b/internal/precache/workload/pullImages.go @@ -20,7 +20,6 @@ import ( "fmt" "os" "strconv" - "strings" "sync" log "github.com/sirupsen/logrus" @@ -86,10 +85,6 @@ func pullImage(image, authFile string, progress *precache.Progress) error { } else { message := fmt.Sprintf("%v", err) log.Infof("Attempt %d/%d: Failed to pull %s: %s", i+1, MaxRetries, image, message) - if strings.Contains(message, "manifest unknown") { - // no point to retry if we can reach the registry and the digest doesn't exist - break - } } } // update precache progress tracker