Skip to content

validate.go: add the verification content#548

Merged
jonboulle merged 1 commit intoopencontainers:masterfrom
zhouhao3:validate-layers
Feb 21, 2017
Merged

validate.go: add the verification content#548
jonboulle merged 1 commit intoopencontainers:masterfrom
zhouhao3:validate-layers

Conversation

@zhouhao3
Copy link
Copy Markdown

@zhouhao3 zhouhao3 commented Feb 2, 2017

According to this modified.
Signed-off-by: zhouhao zhouhao@cn.fujitsu.com

Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
@zhouhao3
Copy link
Copy Markdown
Author

zhouhao3 commented Feb 2, 2017

Here I have a doubt that there is no reason for the validation of the mediatype field, because the mediatype field is optional and not always present in the descriptor.

@wking
Copy link
Copy Markdown
Contributor

wking commented Feb 2, 2017 via email

@stevvooe
Copy link
Copy Markdown
Contributor

stevvooe commented Feb 2, 2017

It might be better to combine this into a function that tells whether or not a mediatype is a layer, although, this validation may be too strict.

@zhouhao3
Copy link
Copy Markdown
Author

zhouhao3 commented Feb 6, 2017

It might be better to combine this into a function that tells whether or not a mediatype is a layer, although, this validation may be too strict.

@stevvooe The judgment here is only a warning, not an error. So it can not be said that the conditions are not layers.So I do not think your idea is good.

@vbatts
Copy link
Copy Markdown
Member

vbatts commented Feb 8, 2017

LGTM

Approved with PullApprove

@cyphar
Copy link
Copy Markdown
Member

cyphar commented Feb 9, 2017

@wking As @q384566678 said, this is only a warning -- the discussion inside opencontainers/image-tools#111 is not completely valid (this schema validator is not meant to error on unknown layer types).

@zhouhao3
Copy link
Copy Markdown
Author

zhouhao3 commented Feb 20, 2017

@philips @jonboulle @stevvooe PTAL

@jonboulle
Copy link
Copy Markdown
Contributor

jonboulle commented Feb 21, 2017

lgtm

Approved with PullApprove

@jonboulle jonboulle merged commit a431dbc into opencontainers:master Feb 21, 2017
@stevvooe
Copy link
Copy Markdown
Contributor

As @cyphar said, this is probably too aggressive.

@zhouhao3 zhouhao3 deleted the validate-layers branch February 23, 2017 03:49
@vbatts vbatts mentioned this pull request May 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants