{"action":"closed","issue":{"url":"https://api.github.com/repos/cyphar/umoci/issues/22","repository_url":"https://api.github.com/repos/cyphar/umoci","labels_url":"https://api.github.com/repos/cyphar/umoci/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/cyphar/umoci/issues/22/comments","events_url":"https://api.github.com/repos/cyphar/umoci/issues/22/events","html_url":"https://github.com/cyphar/umoci/issues/22","id":187575521,"number":22,"title":"umoci: implement direct digest referencing","user":{"login":"cyphar","id":2888411,"avatar_url":"https://avatars.githubusercontent.com/u/2888411?v=3","gravatar_id":"","url":"https://api.github.com/users/cyphar","html_url":"https://github.com/cyphar","followers_url":"https://api.github.com/users/cyphar/followers","following_url":"https://api.github.com/users/cyphar/following{/other_user}","gists_url":"https://api.github.com/users/cyphar/gists{/gist_id}","starred_url":"https://api.github.com/users/cyphar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyphar/subscriptions","organizations_url":"https://api.github.com/users/cyphar/orgs","repos_url":"https://api.github.com/users/cyphar/repos","events_url":"https://api.github.com/users/cyphar/events{/privacy}","received_events_url":"https://api.github.com/users/cyphar/received_events","type":"User","site_admin":false},"labels":[{"id":476093439,"url":"https://api.github.com/repos/cyphar/umoci/labels/cmd/**","name":"cmd/**","color":"d64937","default":false},{"id":476003524,"url":"https://api.github.com/repos/cyphar/umoci/labels/feature","name":"feature","color":"e99695","default":false},{"id":476003175,"url":"https://api.github.com/repos/cyphar/umoci/labels/image/cas","name":"image/cas","color":"3775d6","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-06T17:27:36Z","updated_at":"2016-12-10T20:20:59Z","closed_at":"2016-12-10T20:20:59Z","body":"Currently we have to go through `refs` exclusively, which means that you can't tag a blob that doesn't already have a tag. This is a bit of a pain (though with `umoci init` it won't be a blocking issue). \r\n\r\nHowever, a nice way of fixing this would be implementing an indexer for an OCI image (which does the same sort of indexing that `umoci gc` does but in addition storing the `MediaType` of the object referenced). Then we could always guarantee that we had blob references for _most_ blobs, and we could then go with a backup option of just using `MediaType` as gospel.\r\n\r\nThe only downside to this approach is that layer diff blobs will not be practically usable (since we can't tell between a distributable and non-distributable blob -- though I'm not sure if the spec even says that a particular layer diff blob is in a strict binary between the two types). But we can just check for a `gzip` header (or just check that it's **not** JSON) and move on with our lives, and then not allow operations that directly reference those blobs.\r\n\r\nWe could also add an explicit `--mediatype` option that allows for overwriting of the detected mediatype (probably dangerous). Then we can just not allow operations on any untyped blob."}}
{"actor":{"display_login":"cyphar"}}