-
Notifications
You must be signed in to change notification settings - Fork 694
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
Use layer digest in the description of DiffID #328
Conversation
@@ -32,7 +32,7 @@ This specification uses the following terms: | |||
<dd> | |||
A layer DiffID is a SHA256 digest over the layer's uncompressed tar archive and serialized in the descriptor digest format, e.g., <code>sha256:a9561eb1b190625c9adb5a9513e72c4dedafc1cb2d4c5236c9a6957ec7dfd5a9</code>. | |||
Layers must be packed and unpacked reproducibly to avoid changing the layer ID, for example by using tar-split to save the tar headers. | |||
NOTE: the DiffID is different than the digest in the manifest list because the manifest digest is taken over the gzipped layer for <code>application/vnd.oci.image.layer.tar+gzip</code> types. | |||
NOTE: the DiffID is different than the digest in the manifest list because the digest in the manifest is taken over the gzipped layer for <code>application/vnd.oci.image.layer.tar+gzip</code> types. |
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.
+1 to avoiding “manifest digest”. But to make it extra clear that we're comparing with layer digests, how about a separate paragraph:
The DiffID is different than the layer digest in the <a href="manifest.md#image-manifest-property-descriptions">manifest's <code>layers</code></a> because the layer digest is taken over the blob regardless of compression, while the DiffID is taken after removing any compression.
For an <code>application/vnd.oci.image.layer.tar+gzip</code> layer.md, the layer digest is taken over the <code>application/vnd.oci.image.layer.tar+gzip</code> content, while the DiffID is take over the <code>application/vnd.oci.image.layer.tar</code> content.
Although that gets into defining a +gzip
suffix (more on that in #316).
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.
@wking You suggestion make it much more clear, but the application/vnd.oci.image.layer.tar
is not explicit define at the moment.
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.
Mentioning manifests here is the real problem. We should probably just say this is the content of the uncompressed layer tar.
On Mon, Sep 19, 2016 at 07:35:57PM -0700, Lei Jitang wrote:
So we wait until #316 or similar lands with a definition of the +gzip |
On 20/09/16 01:37 -0700, W. Trevor King wrote:
This change does not require waiting on the +gzip wording. That is one |
This LGTM though perhaps it could go a step further to word that "the
digest in the manifest is taken over the entire object" or " ... opaque
blob"? So it is not so specific to just gzipped layers?
|
On Wed, Sep 21, 2016 at 12:57:02PM -0700, Vincent Batts wrote:
With the suffix defined, we could use the wording I've proposed in |
@@ -32,7 +32,7 @@ This specification uses the following terms: | |||
<dd> | |||
A layer DiffID is a SHA256 digest over the layer's uncompressed tar archive and serialized in the descriptor digest format, e.g., <code>sha256:a9561eb1b190625c9adb5a9513e72c4dedafc1cb2d4c5236c9a6957ec7dfd5a9</code>. | |||
Layers must be packed and unpacked reproducibly to avoid changing the layer ID, for example by using tar-split to save the tar headers. | |||
NOTE: the DiffID is different than the digest in the manifest list because the manifest digest is taken over the gzipped layer for <code>application/vnd.oci.image.layer.tar+gzip</code> types. | |||
NOTE: the DiffID is different than the digest in the manifest list because the digest in the manifest is taken over the gzipped layer for <code>application/vnd.oci.image.layer.tar+gzip</code> types. |
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.
Mentioning manifests here is the real problem. We should probably just say this is the content of the uncompressed layer tar.
@@ -32,7 +32,7 @@ This specification uses the following terms: | |||
<dd> | |||
A layer DiffID is a SHA256 digest over the layer's uncompressed tar archive and serialized in the descriptor digest format, e.g., <code>sha256:a9561eb1b190625c9adb5a9513e72c4dedafc1cb2d4c5236c9a6957ec7dfd5a9</code>. | |||
Layers must be packed and unpacked reproducibly to avoid changing the layer ID, for example by using tar-split to save the tar headers. | |||
NOTE: the DiffID is different than the digest in the manifest list because the manifest digest is taken over the gzipped layer for <code>application/vnd.oci.image.layer.tar+gzip</code> types. | |||
NOTE: the DiffID is different than the layer digest because the digest is taken over the content of the uncompressted layer tar for <code>application/vnd.oci.image.layer.tar+gzip</code> types. |
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.
uncompressed
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.
@vbatts fixed, thx
3b5a4b2
to
a319777
Compare
the needs another LGTM |
@@ -28,7 +28,7 @@ Changing it means creating a new derived image, instead of changing the existing | |||
A layer DiffID is a SHA256 digest over the layer's uncompressed tar archive and serialized in the descriptor digest format, e.g., `sha256:a9561eb1b190625c9adb5a9513e72c4dedafc1cb2d4c5236c9a6957ec7dfd5a9`. | |||
Layers must be packed and unpacked reproducibly to avoid changing the layer DiffID, for example by using tar-split to save the tar headers. | |||
|
|||
NOTE: the DiffID is different than the digest in the manifest list because the manifest digest is taken over the gzipped layer for `application/vnd.oci.image.layer.v1.tar+gzip` types. | |||
NOTE: the DiffID is different than the layer digest because the layer digest is taken over the content of the gzipped layer for `application/vnd.oci.image.layer.v1.tar+gzip` types. |
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: the DiffID is different than the layer digest because it is taken over the uncompressed content of the gzipped layer for
application/vnd.oci.image.layer.v1.tar+gzip
types.
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.
Your suggested language points out the DiffID being over the uncompressed content. @coolljt0725's current wording points out the layer digest being over the (raw) gzipped content. Both of these are important for understanding the difference, and while the uncompressed-ness of DiffID is mentioned in the previous paragraph, I think it's worth talking about both of them in this note. I have wording for that in my earlier suggestion. Until something like #332 or #388 lands, we could just use “over the uncompressed content” instead of “over the application/vnd.oci.image.layer.v1.tar
content”.
@stevvooe updated |
Signed-off-by: Lei Jitang <[email protected]>
ping @vbatts needs re-LGTM after rebasing |
Signed-off-by: Lei Jitang [email protected]
manifest digest
means the digest of manifest, I think this is wrong.