Merge pull request #42965 from thaJeztah/do_not_retry

distribution: do not retry unsupported layer media types
This commit is contained in:
Sebastiaan van Stijn 2021-10-28 21:18:23 +02:00 committed by GitHub
commit 229bc1ee8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -466,7 +466,7 @@ func (pd *v2PushDescriptor) uploadUsingSession(
case schema2.MediaTypeLayer:
default:
reader.Close()
return distribution.Descriptor{}, fmt.Errorf("unsupported layer media type %s", m)
return distribution.Descriptor{}, xfer.DoNotRetry{Err: fmt.Errorf("unsupported layer media type %s", m)}
}
digester := digest.Canonical.Digester()