Skip to content
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

manifest: remove ManifestList type #238

Closed
wants to merge 1 commit into from

Conversation

erikh
Copy link
Contributor

@erikh erikh commented Feb 18, 2017

This was breaking in the latest version of the opencontainers manifest library.

I removed it because the type no longer exists, so I presumed the feature no longer exists, perhaps a hasty assumption. I'll research and fix this up if necessary, but it was a very small patch.

Signed-off-by: Erik Hollensbe <[email protected]>
@@ -54,7 +54,7 @@ func GuessMIMEType(manifest []byte) string {
}

switch meta.MediaType {
case DockerV2Schema2MediaType, DockerV2ListMediaType, imgspecv1.MediaTypeImageManifest, imgspecv1.MediaTypeImageManifestList: // A recognized type.
case DockerV2Schema2MediaType, DockerV2ListMediaType, imgspecv1.MediaTypeImageManifest: // A recognized type.
Copy link
Member

Choose a reason for hiding this comment

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

GuessMIMEType no longer guesses mime types from OCI unfortunately. I think we need to get rid of the image manifest type as well.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah; when OCI has removed the MediaType field, we should have something like this PR whether or not we hide the build breakage by vendoring and old version.

(Or I guess we could leave this in, with hard-coded strings, just to be able to deal with some existing pre-1.0 files.)

@@ -22,7 +22,6 @@ func TestGuessMIMEType(t *testing.T) {
mimeType string
}{
{"ociv1.manifest.json", imgspecv1.MediaTypeImageManifest},
{"ociv1list.manifest.json", imgspecv1.MediaTypeImageManifestList},
Copy link
Member

Choose a reason for hiding this comment

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

you should "rm" the fixture also

@runcom runcom mentioned this pull request Feb 20, 2017
@erikh
Copy link
Contributor Author

erikh commented Feb 20, 2017 via email

@cyphar
Copy link
Contributor

cyphar commented Feb 20, 2017

This patch isn't right. It wasn't removed, the type was renamed in opencontainers/image-spec#546.

But as I mentioned in #193, this is breaking the build because we are trying to run our tests with master of a specification that is still being worked on. Which is insanity. The correct fix is to run our tests within a project that has actually vendored the specification.

Since containers/image still only supports OCI version 1.0.0-rc4 (because -rc5 isn't out yet) there's no point in making half-changes when we're going to have to rewrite quite a few parts of the oci: transport.

@erikh
Copy link
Contributor Author

erikh commented Feb 20, 2017 via email

@cyphar
Copy link
Contributor

cyphar commented Feb 20, 2017

@erikh I've started working on fixing it with containers/skopeo#308 -- though it would be great if we didn't require skopeo in order to test anything (the current situation with the cross-vendoring is getting a bit silly).

@erikh
Copy link
Contributor Author

erikh commented Feb 20, 2017 via email

@erikh
Copy link
Contributor Author

erikh commented Feb 21, 2017

I have filed #240 to resolve this issue in another way. I will close this issue now.

@erikh erikh closed this Feb 21, 2017
@erikh erikh deleted the fix-manifest branch February 21, 2017 10:27
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.

4 participants