-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
After #2474 , pushes of schema1 manifests are disabled by default.
Unfortunately, because distribution.ErrSchemaV1Unsupported is not registered in github.com/docker/distribution/registry/api/errcode, trying to push such a manifest results in generic:
HTTP/1.1 500 Internal Server Error
Connection: close
…
{"errors":[{"code":"UNKNOWN","message":"unknown error","detail":{}}]}
which does not allow automatically differentiating the “schema1 manifests are disabled” situation from other internal failures.
Please define a new error code specific to “the manifest MIME type or contents are not recognized, or recognized and rejected”, and use it here; or reuse one of the previously used values in this case:
ErrorCodeManifestInvalid, returned by OpenShift for schema2 when configured withacceptschema2=falseErrorCodeTagInvalid, returned by docker/distribution (as of commit ec87e9b) when uploading to a tag (IIRC because it tries to parse a schema2 manifest as schema1, and it can’t find a tag matching the HTTP request path inside the manifest)
brackendawson
Metadata
Metadata
Assignees
Labels
No labels