-
Notifications
You must be signed in to change notification settings - Fork 83
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
Modify the ref information #89
Conversation
image/image.go
Outdated
@@ -120,7 +120,7 @@ func unpack(w walker, dest, refName string) error { | |||
return err | |||
} | |||
|
|||
if err = ref.validate(w, validRefMediaTypes); err != nil { | |||
if err = ref.validate(w, []string{v1.MediaTypeImageManifest}); err != nil { |
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.
the ref could refer to manifest
or manifest list
, I don't think we need this change.
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.
But in this place must be manifest
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 don't think so. If the ref
of an OCI image refer to a manifest list, and the the manifest list refer to a manifest, the findManifest
below are supposed to get the manifest
from the manifest list
(the pr #51 your are woking on are doing this). With your changes, this process are break.
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.
manifest list
points to only a few special manifests
, just specify its platform
, there is no other property requirements. I do not think this is what you want to get, and in the instructions, ref
can only point to the manifest
.
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 pr #51 ,Only in the validation function need to confirm the manifest and manifestlist, and I just change the unpack and create-runtime-bundel function
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.
manifest list points to only a few special manifests, just specify its platform, there is no other property
I don't know if you understand the manifest list
correctly :). How could you unpack a OCI image if the ref
( for more information about ref https://github.com/opencontainers/image-spec/blob/master/image-layout.md) points to manifest list ? and how do you know the ref
is always point to a manifest ?
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 are right, I was misled by some wrong information, and now I have this information modified.
72a68e8
to
b5e4955
Compare
b5e4955
to
3121811
Compare
@q384566678 image-tool can't handle manifest list at the moment, let's waiting the image-tool for adding this function and then let's has these changes in this pr, WDYT? |
let's make the image-tool can handle manifest list first then update the docs. close at the moment and will reopen once the image-tool can handle manifest list |
Since the verification of the index has been improved in #51 , so I reopen this. |
c9ccc11
to
18ea452
Compare
man/oci-image-tool-create.1.md
Outdated
@@ -18,7 +18,7 @@ runtime-spec-compatible `dest/config.json`. | |||
Print usage statement | |||
|
|||
**--ref**="" | |||
The ref pointing to the manifest of the OCI image. This must be present in the "refs" subdirectory of the image. (default "v1.0") | |||
The ref pointing to the manifest or the image index of the OCI image. This must be present in the "refs" subdirectory of the image. (default "v1.0") |
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 think refs directory does not exist any more according to the spec
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. And I think it's more appropriate to change ref to tag.
91a3531
to
02c6e21
Compare
man/oci-image-tool-create.1.md
Outdated
**--ref**="" | ||
The ref pointing to the manifest of the OCI image. This must be present in the "refs" subdirectory of the image. (default "v1.0") | ||
**--tag**="" | ||
The tag pointing to the manifest or the image index of the OCI image. his must be matching 'org.opencontainers.image.ref.name' annotations in index.json. (default "v1.0") |
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.
The spec always uses ref, and I prefer to ref. And ref must be pointing to a manifest, will not be an image index, we can get the manifest via image index. So I think the change is not correct.
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
Because #169 has been merged, so close this pr. |
According to some norms can be seen, ref can also point to the manifest list, here only to modify some of the error message, some code error will continue to update in #51 .
I think it's more appropriate to change ref to tag.
Signed-off-by: zhouhao zhouhao@cn.fujitsu.com