{"action":"created","issue":{"url":"https://api.github.com/repos/opencontainers/image-spec/issues/273","repository_url":"https://api.github.com/repos/opencontainers/image-spec","labels_url":"https://api.github.com/repos/opencontainers/image-spec/issues/273/labels{/name}","comments_url":"https://api.github.com/repos/opencontainers/image-spec/issues/273/comments","events_url":"https://api.github.com/repos/opencontainers/image-spec/issues/273/events","html_url":"https://github.com/opencontainers/image-spec/pull/273","id":175462040,"number":273,"title":"fix bug: media types mismatch in manifest","user":{"login":"xiekeyang","id":9944031,"avatar_url":"https://avatars.githubusercontent.com/u/9944031?v=3","gravatar_id":"","url":"https://api.github.com/users/xiekeyang","html_url":"https://github.com/xiekeyang","followers_url":"https://api.github.com/users/xiekeyang/followers","following_url":"https://api.github.com/users/xiekeyang/following{/other_user}","gists_url":"https://api.github.com/users/xiekeyang/gists{/gist_id}","starred_url":"https://api.github.com/users/xiekeyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiekeyang/subscriptions","organizations_url":"https://api.github.com/users/xiekeyang/orgs","repos_url":"https://api.github.com/users/xiekeyang/repos","events_url":"https://api.github.com/users/xiekeyang/events{/privacy}","received_events_url":"https://api.github.com/users/xiekeyang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-07T09:59:55Z","updated_at":"2016-09-09T10:28:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/opencontainers/image-spec/pulls/273","html_url":"https://github.com/opencontainers/image-spec/pull/273","diff_url":"https://github.com/opencontainers/image-spec/pull/273.diff","patch_url":"https://github.com/opencontainers/image-spec/pull/273.patch"},"body":"It is passed validation on manifest part, even the config mediatype and layer mediatype inside is mismatch.\r\nIt had better to add media type item(config and layer) checking on manifest Validate.\r\nbug case:\r\n```json\r\n{\r\n    \"annotations\": null,\r\n    \"config\": {\r\n        \"digest\": \"sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749\",\r\n        \"mediaType\": \"application/vnd.oci.image.serialization.config.v1+json\",\r\n        \"size\": 1459\r\n    },  \r\n    \"layers\": [\r\n        {   \r\n            \"digest\": \"sha256:8ddc19f16526912237dd8af81971d5e4dd0587907234be2b83e249518d5b673f\",\r\n            \"mediaType\": \"application/vnd.oci.image.serialization.rootfs.tar.gzip\",\r\n            \"size\": 667590\r\n        }   \r\n    ],  \r\n    \"mediaType\": \"application/vnd.oci.image.manifest.v1+json\",\r\n    \"schemaVersion\": 2\r\n}\r\n```\r\n\r\nvalidate result is OK. But  \"mediaType\": \"application/vnd.oci.image.serialization.rootfs.tar.gzip\" and \"mediaType\": \"application/vnd.oci.image.serialization.config.v1+json\" have been unsupported.\r\n\r\n\r\nSigned-off-by: xiekeyang <xiekeyang@huawei.com>"},"comment":{"url":"https://api.github.com/repos/opencontainers/image-spec/issues/comments/245877633","html_url":"https://github.com/opencontainers/image-spec/pull/273#issuecomment-245877633","issue_url":"https://api.github.com/repos/opencontainers/image-spec/issues/273","id":245877633,"user":{"login":"runcom","id":849915,"avatar_url":"https://avatars.githubusercontent.com/u/849915?v=3","gravatar_id":"","url":"https://api.github.com/users/runcom","html_url":"https://github.com/runcom","followers_url":"https://api.github.com/users/runcom/followers","following_url":"https://api.github.com/users/runcom/following{/other_user}","gists_url":"https://api.github.com/users/runcom/gists{/gist_id}","starred_url":"https://api.github.com/users/runcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runcom/subscriptions","organizations_url":"https://api.github.com/users/runcom/orgs","repos_url":"https://api.github.com/users/runcom/repos","events_url":"https://api.github.com/users/runcom/events{/privacy}","received_events_url":"https://api.github.com/users/runcom/received_events","type":"User","site_admin":false},"created_at":"2016-09-09T10:28:18Z","updated_at":"2016-09-09T10:28:18Z","body":"> @runcom I think unsupported warning is inappropriate. media type is standard definition in spec.\r\n> Should we pass the validation when it not follow the spec?\r\n\r\nquoting @wking from https://github.com/opencontainers/image-spec/issues/286#issuecomment-245856987\r\n\r\n> The spec does not currently place restrictions on allowed types for\r\nmanifest-list.manifests, manifest.layers, or manifest.config\r\n\r\nwe should first assure the spec defines or not those constraints "}}
{"actor":{"display_login":"runcom"}}