descriptor.md: Add the urls attribute instance in the Examples#437
descriptor.md: Add the urls attribute instance in the Examples#437vbatts merged 1 commit intoopencontainers:masterfrom zhouhao3:test-url
Conversation
| @@ -115,5 +115,8 @@ The following example describes a [_Manifest_](manifest.md#image-manifest) with | |||
| "mediaType": "application/vnd.oci.image.manifest.v1+json", | |||
| "size": 7682, | |||
| "digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270" | |||
There was a problem hiding this comment.
missing , at the end of this line
descriptor.md
Outdated
| "digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270", | ||
| "urls": { | ||
| "https://example.com/example" | ||
| } |
descriptor.md
Outdated
| "digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270", | ||
| "urls": { | ||
| "https://example.com/example" | ||
| } |
|
e1332db looks good to me.
|
|
@philips Please re-LGTM, thanks |
|
Rejected. The We could add another section explaining the handling of the field, when encountered. |
|
On Mon, Nov 21, 2016 at 12:02:09PM -0800, Stephen Day wrote:
It might be exemplary for a nondistributable layer? Maybe we could |
Yes, I would keep the example narrow. Basically, "if you see one like this, try to grab the content from the urls before resolving remotely". |
|
On Mon, Nov 21, 2016 at 01:07:49PM -0800, Stephen Day wrote:
Do we even need explanatory text? That should already be covered by ExamplesThe following example describes a Manifest…[snip same as now] {
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"size": 7682,
"digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270"
}The following example describes a non-distributable layer: {
"mediaType": "application/vnd.oci.image.layer.nondistributable.v1.tar+gzip",
"size": 10815,
"digest": "sha256:67877ffadef141079c71284ce7d8302e4d05fedc4be397f32f99bc6e97a00cb4",
"urls": [
"https://example.com/base-layer.tar.gz
]
} |
|
@wking Yes, we need explanatory text, because a lot of people won't understand that a layer with urls but without the media type isn't nondistributable. Again, as I have said about a million times, context is important. |
|
On Mon, Nov 21, 2016 at 01:45:46PM -0800, Stephen Day wrote:
So make it a minimal pivot from the “common case” example: ExamplesThe following example describes a Manifest…[snip same as now] {
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"size": 7682,
"digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270"
}If the manifest was available outside of CAS, you could add locations to {
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"size": 7682,
"digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270"
"urls": [
"https://example.com/example-manifest"
]
} |
Common sense isn't so common. It also makes assumptions about the reader's prior knowledge and their understanding of when |
|
On Mon, Nov 21, 2016 at 02:14:09PM -0800, Stephen Day wrote:
As it stands, the ‘urls’ property definition has no warnings at all |
Or, we can use examples to demonstrate exemplary use cases, with appropriate context, like I requested here. |
|
So what you mean is that in the examples to add urls, there must be relevant instructions? |
|
Is this discussion blocking this from being merged? or can it happen in a follow-up? |
|
The problem here is that the Make a separate example showing the use of |
descriptor.md
Outdated
| "digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270" | ||
| } | ||
|
|
||
| If the manifest was available outside of CAS, you could add locations to urls: |
There was a problem hiding this comment.
In the following example, the descriptor indicates that the referenced manifest is retrievable from a particular URL:
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
|
@jonboulle @philips PTAL |
|
bc78dcc looks good to me too.
|
Signed-off-by: zhouhao zhouhao@cn.fujitsu.com