-
Notifications
You must be signed in to change notification settings - Fork 229
Conformance test redesign #588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Note: This does not work yet. Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
… method Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
…PI config Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
… response Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
…rror handling Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
More work is needed on the POST only to add a PUT fallback. Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
Signed-off-by: Brandon Mitchell <[email protected]>
| return fmt.Errorf("failed to generate test data: %w", err) | ||
| } | ||
| } | ||
| // image with non-distributable layers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests appear to be conflating two concepts 😇
For lack of an officially spec-defined term, blobs whose descriptors include the urls key are colloquially known as "foreign layers", and technically any blob could be foreign (with zero change to the mediaType), although most registries probably validate config differently from layers in that respect (I know Docker Hub certainly does 😇).
Non-distributable layers (those with mediaType of application/vnd.oci.image.layer.nondistributable.v1.tar*), on the other hand, may or may not be explicitly "foreign" (ie, they may or may not have urls set).
-
This OPTIONAL property specifies a list of URIs from which this object MAY be downloaded.
-
https://github.com/opencontainers/image-spec/blob/v1.1.1/layer.md#non-distributable-layers
Descriptors referencing non-distributable layers MAY include
urlsfor downloading these layers directly; however, the presence of theurlsfield SHOULD NOT be used to determine whether or not a layer is non-distributable.
(For historical curiosity, this evolved/matured/split in two parts from the application/vnd.docker.image.rootfs.foreign.diff.tar.gzip media type in the previous "Docker Image Manifest Version 2, Schema 2" spec: https://github.com/distribution/distribution/blob/10e4312e62ab3b0c53bc0e31ade82fbe38af1b43/docs/content/spec/manifest-v2-2.md#:~:text=application/vnd.docker.image.rootfs.foreign.diff.tar.gzip%3A%20%22Layer%22%2C%20as%20a%20gzipped%20tar%20that%20should%20never%20be%20pushed -- this is where I've cribbed the term "foreign layer" from, because "blob/descriptor with urls set" is a mouthful.)
This is a redesign of the conformance tests with the following goals:
go test. This will allow unit testing and avoid some of the Go testing wrappers.This is still in draft for now, with this open PR for better visibility. Various remaining tasks include:
Other wish list items:
Merging this will unblock #543. Closes #548. Closes #501. Closes #416.