-
Notifications
You must be signed in to change notification settings - Fork 86
Conversation
The image spec requries that ```` MUST be set to layers. Implementations MUST generate an error if they encounter a unknown value while verifying or unpacking an image. ``` The image-tool should act as the image spec says. Signed-off-by: Lei Jiang <[email protected]>
| } | ||
| // check if the rootfs type is 'layers' | ||
| if c.RootFS.Type != "layers" { | ||
| return fmt.Errorf("'%s' is an unknown rootfs type, MUST be 'layers'", c.RootFS.Type) |
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.
'%s'→ %q.
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.
it's a string. granted the %q would put it in quotes, but this seems fine for now.
|
LGTM |
|
it's checked in JSON Schema ,need to check it here? |
|
On Thu, Oct 20, 2016 at 11:57:24PM -0700, Zhou Hao wrote:
It is checked in JSON Schema since opencontainers/image-spec#358, which landed a day after this PR. So once we bump the vendored image-spec dependency to pull in opencontainers/image-spec#358 we can revert this PR. I think we want a policy for handling these image-spec validation bugs cleanly going forward (opencontainers/image-spec#406). |
|
I think these fixed values(Such as SchemaVersion and MediaType,and so on) should be checked in JSON Schema. |
|
On Fri, Oct 21, 2016 at 12:20:36AM -0700, Zhou Hao wrote:
And in image-spec's master, they are. But in image-tool's master (pulling in opencontainers/image-spec@7e6e2f76d6, v1.0.0-rc1~18), they are not (and are checked by the code which landed via this PR). Once image-spec cuts v1.0.0-rc2 and image-tools bumps its dependency to pull in that release, we can drop the local check. |
The image spec requries that
The image-tool should act as the image spec says.
Signed-off-by: Lei Jiang [email protected]