image-layout: fix inconsistent description about external blob store#656
image-layout: fix inconsistent description about external blob store#656vbatts merged 1 commit intoopencontainers:masterfrom
Conversation
image-layout.md
Outdated
|
|
||
| * Object names in the `blobs` subdirectories are composed of a directory for each hash algorithm, the children of which will contain the actual content. | ||
| * A blob, referenced with digest `<alg>:<hex>` (per [descriptor](descriptor.md#digests-and-verification)), MUST have its content stored in a file under `blobs/<alg>/<hex>`. | ||
| * A blob, referenced with digest `<alg>:<hex>` (per [descriptor](descriptor.md#digests-and-verification)), SHOULD have its content stored in a file under `blobs/<alg>/<hex>`. |
There was a problem hiding this comment.
I think that's weakening this too much, since it allows you to store <alg1>:<hex1> at blobs/<alg2>/<hex2> (or anywhere really). How about:
The content of
blobs/<alg>/<hex>MUST match the digest<alg>:<hex>.
c50dac0 to
08460eb
Compare
image-layout.md
Outdated
| * A blob, referenced with digest `<alg>:<hex>` (per [descriptor](descriptor.md#digests-and-verification)), MUST have its content stored in a file under `blobs/<alg>/<hex>`. | ||
| * The character set of the entry name for `<hex>` and `<alg>` MUST match the respective grammar elements described in [descriptor](descriptor.md#digests-and-verification). | ||
| * For example `sha256:5b` will map to the layout `blobs/sha256/5b`. | ||
| * The content of `blobs/<alg>/<encoded>` MUST match the digest `<alg>:<encoded>` (referenced per [descriptor](descriptor.md#digests-and-verification)). For example, the content of `blobs/sha256/5b` MUST match the digest `sha256:5b`. |
There was a problem hiding this comment.
I'd rather not use <encoded> here, since we currently require hex there. If/when #654 lands, it can update the <hex> reference.
It would also be nice to use a valid descriptor like sha256:da39a3ee5e6b4b0d3255bfef95601890afd80709, although since the current master uses sha256:5b, that would be a somewhat orthogonal fixup (but it seems like a fairly straightforward fix, so I thought I'd mention it in case you want to pick it up here).
image-layout.md
Outdated
| * The character set of the entry name for `<hex>` and `<alg>` MUST match the respective grammar elements described in [descriptor](descriptor.md#digests-and-verification). | ||
| * For example `sha256:5b` will map to the layout `blobs/sha256/5b`. | ||
| * The content of `blobs/<alg>/<encoded>` MUST match the digest `<alg>:<encoded>` (referenced per [descriptor](descriptor.md#digests-and-verification)). For example, the content of `blobs/sha256/5b` MUST match the digest `sha256:5b`. | ||
| * The character set of the entry name for `<hex>` and `<encoded>` MUST match the respective grammar elements described in [descriptor](descriptor.md#digests-and-verification). |
There was a problem hiding this comment.
“<hex> and <encoded>” should be “<alg> and <hex>” (or “<alg> and <encoded>” in the post-#654 world).
08460eb to
024529b
Compare
Following sentences were conflicting: * A blob, referenced with digest `<alg>:<hex>` (per [descriptor](descriptor.md#digests-and-verification)), MUST have its content stored in a file under `blobs/<alg>/<hex>`. * The blobs directory MAY be missing referenced blobs, in which case the missing blobs SHOULD be fulfilled by an external blob store. Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
024529b to
f3cadcd
Compare
|
rebased PTAL @stevvooe |
|
LGTM @AkihiroSuda Thank you, again! |
|
@vbatts PTAL? |
| * A blob, referenced with digest `<alg>:<encoded>` (per [descriptor](descriptor.md#digests-and-verification)), MUST have its content stored in a file under `blobs/<alg>/<encoded>`. | ||
| * The character set of the entry name for `<encoded>` and `<alg>` MUST match the respective grammar elements described in [descriptor](descriptor.md#digests-and-verification). | ||
| * For example `sha256:5b` will map to the layout `blobs/sha256/5b`. | ||
| * The content of `blobs/<alg>/<encoded>` MUST match the digest `<alg>:<encoded>` (referenced per [descriptor](descriptor.md#digests-and-verification)). For example, the content of `blobs/sha256/da39a3ee5e6b4b0d3255bfef95601890afd80709` MUST match the digest `sha256:da39a3ee5e6b4b0d3255bfef95601890afd80709`. |
There was a problem hiding this comment.
oh interesting. So this will have to match the character set being discussed for URI charset
There was a problem hiding this comment.
So this will have to match the character set being discussed for URI charset
I think you're talking about #671 for “URI charset”, but #671 is about org.opencontainers.image.ref.name while this PR is about digests. The digest charset is still fairly restricted.
|
oh you're right. I'm confused.
…On Tue, May 16, 2017 at 4:50 PM W. Trevor King ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In image-layout.md
<#656 (comment)>
:
> @@ -53,9 +53,8 @@ afff3924849e458c5ef237db5f89539274d5e609db5db935ed3959c90f1f
2d51 ./blobs/sha256/
## Blobs
* Object names in the `blobs` subdirectories are composed of a directory for each hash algorithm, the children of which will contain the actual content.
-* A blob, referenced with digest `<alg>:<encoded>` (per [descriptor](descriptor.md#digests-and-verification)), MUST have its content stored in a file under `blobs/<alg>/<encoded>`.
-* The character set of the entry name for `<encoded>` and `<alg>` MUST match the respective grammar elements described in [descriptor](descriptor.md#digests-and-verification).
-* For example `sha256:5b` will map to the layout `blobs/sha256/5b`.
+* The content of `blobs/<alg>/<encoded>` MUST match the digest `<alg>:<encoded>` (referenced per [descriptor](descriptor.md#digests-and-verification)). For example, the content of `blobs/sha256/da39a3ee5e6b4b0d3255bfef95601890afd80709` MUST match the digest `sha256:da39a3ee5e6b4b0d3255bfef95601890afd80709`.
So this will have to match the character set being discussed for URI
charset
I think you're talking about #671
<#671> for “URI
charset”, but #671 <#671>
is about org.opencontainers.image.ref.name while this PR is about
digests. The charset there is still fairly restricted
<https://github.com/opencontainers/image-spec/blob/f03dbe35d449c54915d235f1a3cf8f585a24babe/descriptor.md#digests>
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#656 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEF6U-6nP0GlqLilGDA72hf69JFKpCSks5r6gv2gaJpZM4NIRwk>
.
|
|
LGTY? 😄 |
Following sentences were conflicting:
<alg>:<hex>(per descriptor), MUST have its content stored in a file underblobs/<alg>/<hex>.Signed-off-by: Akihiro Suda suda.akihiro@lab.ntt.co.jp