-
Notifications
You must be signed in to change notification settings - Fork 209
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
Add conformance test coverage for data field #318
Conversation
Signed-off-by: Jason Hall <jasonhall@redhat.com>
fire. let me test this out and report back |
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.
Tried on Bundle Bar, distribution/distribution, and zot. No failures related to the addition of this field
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.
see nit
@@ -35,6 +35,9 @@ type Descriptor struct { | |||
// Size specifies the size in bytes of the blob. | |||
Size int64 `json:"size"` | |||
|
|||
// Data specifies the data of the object described by the descriptor. | |||
Data []byte `json:"data"` |
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.
from the referenced commit
// Data is an embedding of the targeted content. This is encoded as a base64
// string when marshalled to JSON (automatically, by encoding/json). If
// present, Data can be used directly to avoid fetching the targeted content.
Data []byte `json:"data,omitempty"`
don't see how Data could be empty from this test bucket.. just a nit...
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.
It doesn't even seem to matter either way. An empty []byte
with and without the struct tag results in {}
in my tests in the Go Playground.
Adding #321 for tracking |
@opencontainers/distribution-spec-maintainers - can we get another +1? |
Friendly ping. |
The
data
proposal was merged: opencontainers/image-spec#826 🎉This adds some conformance test coverage that the new field is round-trippable through registries, helpfully piggybacking off of #311. Since registries don't validate that the contents match it doesn't seem fair to add that case to conformance, but it's something to consider in the future.
@jdolitsky