-
Notifications
You must be signed in to change notification settings - Fork 664
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
clarification about nested index #716
Conversation
What is meant by required? For whom? There is pretty specific language here: I don't see any reason to forbid an image index referencing another image index, but I'm curious what the use case would be. |
Ah, thanks! My apologies, please ignore me :) I guess I don't quite understand what is meant by "image providers" here:
Does that just refer to distribution in general? (I don't mean to hijack your PR but it seems like the |
I also don't understand the use case for an image index to reference another image index. Notably this is not called out here in the actual index specification: https://github.com/opencontainers/image-spec/blame/master/image-index.md#L35 I'm wondering if this line snuck in accidentally as the original context is very different: Here it refers to blobs in the ref directory, not the descriptors in the index file. |
Yes, I'm +1 for removing nested index if it was introduced by accident. |
I don't see a need for it but could be proven wrong. |
1301924
to
cf8277f
Compare
image-index.md
Outdated
@@ -2,6 +2,7 @@ | |||
|
|||
The image index is a higher-level manifest which points to specific [image manifests](manifest.md), ideal for one or more platforms. | |||
While the use of an image index is OPTIONAL for image providers, image consumers SHOULD be prepared to process them. | |||
Also, the top-level index (`index.json`) is a REQUIRED file in [the image layout](image-layout.md). |
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.
I'd rather not have this line. This file/section is about defining the application/vnd.oci.image.index.v1+json
media type, and should not be about where that media type is used.
I'd also encourage dropping the previous line for the same reason. Instead, requirements about what providers may/should/must supply and what consumers may/should/must consume should be handled in the referencing location. For example, you can see that application/vnd.oci.image.index.v1+json
consumers MUST handle application/vnd.oci.image.manifest.v1+json
in the context of manifests
. And you'd see that consumers of image-layout v1.0.0 MUST handle application/vnd.oci.image.index.v1+json
in the context of index.json
around here (what I think you should be adding in this PR). And you'd see that consumers need not handle v1.0.0 image layouts here (which I think you should also be adding in this PR).
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.
Yes, this doesn't belong in this file.
image-layout.md
Outdated
@@ -149,6 +149,7 @@ This index provides an established path (`/index.json`) to have an entry point f | |||
* Future versions of the spec MAY use a different mediatype (i.e. a new versioned format). | |||
* An encountered `mediaType` that is unknown SHOULD be safely ignored. | |||
|
|||
Note that while `index.json` is a REQUIRED file, the use of an image index is OPTIONAL for image providers. |
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.
I'd shift this line up to the opening section and rephrase it to something like:
Consumers MAY support OCI Image Layout and MAY also support other mechanisms for distributing image content.
The optionality of image-layout support is important enough that I'd rather not bury it 150 lines into the file ;).
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.
We already state this in a clear manner in another doc.
image-layout.md
Outdated
|
||
The first named reference (`"stable-release"`) points to another index that might contain multiple references with several platform specification and annotations. |
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.
Backticks and quotes seems like overkill. Can we use stable-release
here (and v1.0
below)? Those are the names; the quotes are just part of representing strings in JSON.
Also probably “several platform sepecification” → “distinct platforms” or some such.
image-layout.md
Outdated
|
||
The first named reference (`"stable-release"`) points to another index that might contain multiple references with several platform specification and annotations. | ||
Note that the `org.opencontainers.image.ref.name` annotation SHOULD only be considered valid when on descriptors on `index.json`. |
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.
Maybe link to annotations.md
for this so folks can see that we're referencing a requirement defined there.
@AkihiroSuda It would be good if you could file an issue stating the problem before filing PRs. I am not sure that these are correct and they seem redundant with other statements that are already present. What is the problem that you are trying to address here? |
cf8277f
to
318014e
Compare
Opened #720 for the problem: The fact that "Image Layout is OPTIONAL" is not explicitly documented and causing confusion about necessity of I modified this PR to limit its scope to nested index examples. PTAL. |
|
||
The first named reference (`stable-release`) points to another index that might contain multiple references with distinct platforms and annotations. | ||
Note that the [`org.opencontainers.image.ref.name` annotation](annotations.md) SHOULD only be considered valid when on descriptors on `index.json`. |
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.
Note: This redundant sentence is intentionally added for better human understandability.
image-layout.md
Outdated
The first named reference (`stable-release`) points to another index that might contain multiple references with distinct platforms and annotations. | ||
Note that the [`org.opencontainers.image.ref.name` annotation](annotations.md) SHOULD only be considered valid when on descriptors on `index.json`. | ||
|
||
The second named reference ("`v1.0`") points to a manifest that is specific to the linux/ppc64le platform. |
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.
You still have both backticks and quotes here.
318014e
to
1de1632
Compare
Fixed quotation |
@@ -6,6 +6,7 @@ digraph G { | |||
layer [shape=note, label="Layer tar archive\napplication/vnd.oci.image.layer.v1.tar\napplication/vnd.oci.image.layer.v1.tar+gzip\napplication/vnd.oci.image.layer.nondistributable.v1.tar\napplication/vnd.oci.image.layer.nondistributable.v1.tar+gzip"] | |||
} | |||
|
|||
imageIndex -> imageIndex [label="1..*"] |
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.
If we're going to draw this loop in here, I think we also want to SHOULD support for indexes here (for both providers and consumers), at least for the index in index.json
.
1de1632
to
a2fa9b2
Compare
Updated, anyone PTAL? |
lint failure on travis is unrelated: #735 |
Signed-off-by: Akihiro Suda <[email protected]>
a2fa9b2
to
c4c9dec
Compare
ping @opencontainers/image-spec-maintainers |
Signed-off-by: Akihiro Suda [email protected]