From a12ab28e0afb8dd0a05187989dd95c9b9ca3fd68 Mon Sep 17 00:00:00 2001 From: Aaron Lehmann Date: Mon, 11 Jul 2016 18:06:23 -0600 Subject: [PATCH] Don't retry push on an unknown repository If the remote registry responds with a NAME_UNKNOWN error, treat this as a fatal error and don't retry the push. Tested against an ECR registry. Signed-off-by: Aaron Lehmann --- distribution/errors.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/errors.go b/distribution/errors.go index cd8dd590df..a9a17bd261 100644 --- a/distribution/errors.go +++ b/distribution/errors.go @@ -89,7 +89,7 @@ func retryOnError(err error) error { } case errcode.Error: switch v.Code { - case errcode.ErrorCodeUnauthorized, errcode.ErrorCodeUnsupported, errcode.ErrorCodeDenied, errcode.ErrorCodeTooManyRequests: + case errcode.ErrorCodeUnauthorized, errcode.ErrorCodeUnsupported, errcode.ErrorCodeDenied, errcode.ErrorCodeTooManyRequests, v2.ErrorCodeNameUnknown: return xfer.DoNotRetry{Err: err} } case *url.Error: