-
Notifications
You must be signed in to change notification settings - Fork 640
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
descriptor.md: Add the urls attribute instance in the Examples #437
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing ,
at the end of this line
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.
updated
"digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270", | ||
"urls": { | ||
"https://example.com/example" | ||
} |
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.
"digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270", | ||
"urls": { | ||
"https://example.com/example" | ||
} |
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.
urls
should be an array, not an object.
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.
updated,thanks
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 |
@@ -116,4 +116,15 @@ The following example describes a [_Manifest_](manifest.md#image-manifest) with | |||
"size": 7682, | |||
"digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270" | |||
} | |||
|
|||
If the manifest was available outside of CAS, you could add locations to urls: |
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.
In the following example, the descriptor indicates that the referenced manifest is retrievable from a particular URL:
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.
updated
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