Skip to content

Commit

Permalink
Don't retry push on an unknown repository
Browse files Browse the repository at this point in the history
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 <aaron.lehmann@docker.com>
  • Loading branch information
aaronlehmann committed Jul 12, 2016
1 parent 6dc2dd4 commit a12ab28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion distribution/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a12ab28

Please sign in to comment.