Skip to content

Conversation

@runcom
Copy link
Member

@runcom runcom commented Sep 12, 2016

alright @mtrmac this should be the right fix for containers/skopeo#198 - note that `GuessManifestMIMEType cannot actually return a meaningful string to be printed when the mime type isn't recognized so - we may just debug print the manifest.

err = ociDest.PutManifest([]byte(m))
require.Error(t, err)
assert.Contains(t, `Unrecognized manifest media type: "application/vnd.docker.distribution.manifest.v1+prettyjws"`, err.Error())
assert.Equal(t, `can't create an OCI manifest from Docker V2 schema 1 manifest`, err.Error())
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's ok not to differentiate between signed and not-signed here

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes; the users don’t even want to know about schema versions, let alone the pointless signatures.

@mtrmac
Copy link
Collaborator

mtrmac commented Sep 12, 2016

`GuessManifestMIMEType cannot actually return a meaningful string to be printed when the mime type isn't recognized so - we may just debug print the manifest.

That’s a good point; OTOH the set of MIME types detected by GuessManifestMIMEType and this switch may (probably will?) diverge over time.

@runcom
Copy link
Member Author

runcom commented Sep 12, 2016

That’s a good point; OTOH the set of MIME types detected by GuessManifestMIMEType and this switch may (probably will?) diverge over time.

you are right, fixing it!

@runcom runcom force-pushed the signed-v2s1-oci-skip branch from 38f9a6b to e9c5a80 Compare September 12, 2016 14:52
@runcom
Copy link
Member Author

runcom commented Sep 12, 2016

@mtrmac fixed PTAL

@runcom
Copy link
Member Author

runcom commented Sep 12, 2016

lgtm

Approved with PullApprove

@mtrmac
Copy link
Collaborator

mtrmac commented Sep 12, 2016

👍, please merge after tests.

Approved with PullApprove

@runcom runcom merged commit 3154b38 into containers:master Sep 12, 2016
@runcom runcom deleted the signed-v2s1-oci-skip branch September 12, 2016 15:14
runcom added a commit to runcom/skopeo-1 that referenced this pull request Sep 12, 2016
Signed-off-by: Antonio Murdaca <[email protected]>
runcom added a commit to containers/skopeo that referenced this pull request Sep 12, 2016
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.

2 participants