-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
c8d/inspect: Add Manifests
field
#48264
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,4 +127,14 @@ type InspectResponse struct { | |
// WARNING: This is experimental and may change at any time without any backward | ||
// compatibility. | ||
Descriptor *ocispec.Descriptor `json:"Descriptor,omitempty"` | ||
|
||
// Manifests is a list of image manifests available in this image. It | ||
// provides a more detailed view of the platform-specific image manifests or | ||
// other image-attached data like build attestations. | ||
// | ||
// Only available if the daemon provides a multi-platform image store. | ||
// | ||
// WARNING: This is experimental and may change at any time without any backward | ||
// compatibility. | ||
Manifests []ManifestSummary `json:"Manifests,omitempty"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This field should probably be gated by API version. Slightly wondering if this should be (at least currently?) an optional field; similar to how we have the "tree view" optional. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah right, added a version gate. Why should it be optional though? You can only inspect one image anyway, so it won't bloat the transmitted data too much. |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,6 +103,11 @@ type LoadOptions struct { | |
Platforms []ocispec.Platform | ||
} | ||
|
||
type InspectOptions struct { | ||
// Manifests returns the image manifests. | ||
Manifests bool | ||
} | ||
|
||
Comment on lines
+106
to
+110
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It just occurred to me that there's 2 option structs now;
|
||
// SaveOptions holds parameters to save images. | ||
type SaveOptions struct { | ||
// Platforms selects the platforms to save if the image is a | ||
|
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's probably fine to have checks on both clients and API. I was considering that this is an option that we could consider to be ignored on the daemon side, i.e., I think the client would be able to gracefully handle responses where this information is not present.
No need to change, just as a comment, in case we want to revisit this.
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.
Hmm right, older daemons that don't understand the new API wouldn't complain about this, so I think there's no point to make newer daemon fail in this case?