-
Notifications
You must be signed in to change notification settings - Fork 652
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
cmd/oci-image-tool: validate all refs by default #279
Conversation
@@ -49,6 +49,30 @@ func (d *descriptor) hash() string { | |||
return pts[1] | |||
} | |||
|
|||
func findDescriptors(w walker) (map[string]*descriptor, error) { |
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.
Maybe listReferences
? In #159, the analogous function is refs.Engine.List()
.
On Thu, Sep 08, 2016 at 06:52:45AM -0700, Antonio Murdaca wrote:
Update the man page too. |
@runcom If unknown types are encountered, what is the intended behavior? I ask because we do need to be able to have references to unknown things but still pass validation. This will make it easier to extend in the future. |
On Thu, Sep 08, 2016 at 12:47:36PM -0700, Stephen Day wrote:
I think we need to error with “not implemented”-level errors.
That makes sense. We might want an --ignore-unknown-media-types flag What happens if you recognize the ref type |
On Thu, Sep 08, 2016 at 01:00:21PM -0700, Stephen Day wrote:
Sure. I was just linking in previous unrecognized-type discussion to |
@stevvooe right now, if the media type is unknown the tool errors out. We should at least soften that to just print a warning. This behavior is in the |
On Thu, Sep 08, 2016 at 01:58:18PM -0700, Antonio Murdaca wrote:
I'm fine punting unrecognized media type issues to follow up work, |
@runcom SGTM. Please open an issue. |
5c9400d
to
fde1e4d
Compare
Signed-off-by: Antonio Murdaca <[email protected]>
fde1e4d
to
a480306
Compare
LGTM. |
@@ -33,7 +34,7 @@ func ValidateLayout(src string, refs []string, out *log.Logger) error { | |||
|
|||
// Validate walks through the given .tar file and | |||
// validates the manifest pointed to by the given refs | |||
// or returns an error if the validation failed. | |||
//iiii or returns an error if the validation failed. |
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.
iiii? ;-)
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.
lol
LGTM, with one small nit |
LGTM |
This is taking care of #271 (comment) (left a TODO/FIXME for later in case).
I'll adapt everything to be same as per #266 later
/cc @wking @vbatts @philips @stevvooe
Signed-off-by: Antonio Murdaca [email protected]