{"action":"created","comment":{"url":"https://api.github.com/repos/coreos/rkt/pulls/comments/68893365","id":68893365,"diff_hunk":"@@ -0,0 +1,49 @@\n+package fetchers\n+\n+import (\n+\t\"encoding/json\"\n+\t\"io/ioutil\"\n+\t\"os\"\n+)\n+\n+type InsecureOpts struct {\n+\tAllowHTTP      bool `json:\"allow_http\"`\n+\tSkipTLSCheck   bool `json:\"skip_tls_check\"`\n+\tSkipImageCheck bool `json:\"skip_image_check\"`\n+}\n+\n+type FetcherConfig struct {\n+\tScheme        string                         `json:\"scheme\"`\n+\tName          string                         `json:\"name\"`\n+\tInsecureOpts  *InsecureOpts                  `json:\"insecure\"`","path":"rkt/image/fetchers/common.go","position":18,"original_position":18,"commit_id":"7a930d3540acba51b5726af1cf8ddbdb39002964","original_commit_id":"7a930d3540acba51b5726af1cf8ddbdb39002964","user":{"login":"s-urbaniak","id":375856,"avatar_url":"https://avatars.githubusercontent.com/u/375856?v=3","gravatar_id":"","url":"https://api.github.com/users/s-urbaniak","html_url":"https://github.com/s-urbaniak","followers_url":"https://api.github.com/users/s-urbaniak/followers","following_url":"https://api.github.com/users/s-urbaniak/following{/other_user}","gists_url":"https://api.github.com/users/s-urbaniak/gists{/gist_id}","starred_url":"https://api.github.com/users/s-urbaniak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-urbaniak/subscriptions","organizations_url":"https://api.github.com/users/s-urbaniak/orgs","repos_url":"https://api.github.com/users/s-urbaniak/repos","events_url":"https://api.github.com/users/s-urbaniak/events{/privacy}","received_events_url":"https://api.github.com/users/s-urbaniak/received_events","type":"User","site_admin":false},"body":"Can we make this `InsecureOpts InsecureOpts` (not a pointer)? We'd reuse the meaning of the zero value of `InsecureOpts` which would be `AllowHTTP=false`, `SkipTLSCheck=false`, `SkipImageCheck=false`?","created_at":"2016-06-29T06:46:23Z","updated_at":"2016-06-29T06:46:23Z","html_url":"https://github.com/coreos/rkt/pull/2830#discussion_r68893365","pull_request_url":"https://api.github.com/repos/coreos/rkt/pulls/2830","_links":{"self":{"href":"https://api.github.com/repos/coreos/rkt/pulls/comments/68893365"},"html":{"href":"https://github.com/coreos/rkt/pull/2830#discussion_r68893365"},"pull_request":{"href":"https://api.github.com/repos/coreos/rkt/pulls/2830"}}},"pull_request":{"url":"https://api.github.com/repos/coreos/rkt/pulls/2830","id":74868195,"html_url":"https://github.com/coreos/rkt/pull/2830","diff_url":"https://github.com/coreos/rkt/pull/2830.diff","patch_url":"https://github.com/coreos/rkt/pull/2830.patch","issue_url":"https://api.github.com/repos/coreos/rkt/issues/2830","number":2830,"state":"open","locked":false,"title":"stage0: added support for fetching plugins, refactored docker/http(s)","user":{"login":"dgonyeo","id":2439413,"avatar_url":"https://avatars.githubusercontent.com/u/2439413?v=3","gravatar_id":"","url":"https://api.github.com/users/dgonyeo","html_url":"https://github.com/dgonyeo","followers_url":"https://api.github.com/users/dgonyeo/followers","following_url":"https://api.github.com/users/dgonyeo/following{/other_user}","gists_url":"https://api.github.com/users/dgonyeo/gists{/gist_id}","starred_url":"https://api.github.com/users/dgonyeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgonyeo/subscriptions","organizations_url":"https://api.github.com/users/dgonyeo/orgs","repos_url":"https://api.github.com/users/dgonyeo/repos","events_url":"https://api.github.com/users/dgonyeo/events{/privacy}","received_events_url":"https://api.github.com/users/dgonyeo/received_events","type":"User","site_admin":false},"body":"Adds support for having images fetched via a plugin. Plugins take the\r\nform of a binary on the user's path named \"rkt-fetcher-%s\", with the %s\r\ntaking the place of the schema, so for example fetching\r\n`docker://alpine` is redirected to the `rkt-fetcher-docker` binary.\r\n\r\nWhen the plugin is started it has a JSON configuration written to it on\r\nstdin, and its stdout and stderr are forwarded on to the user. The\r\nconfiguration contains paths to write the ACI and ASC files to, which\r\nrkt will then verify (unless the insecure image option is specified).\r\n\r\nThis isn't done yet, just putting this up for review to see what people think before I work on it further.\r\n\r\nThings done:\r\n - Wrote the plugin fetcher in rkt\r\n - Moved the logic for fetching docker images into a plugin\r\n\r\nThings left to do:\r\n - Pull the http(s) logic out into another plugin\r\n - Write docs\r\n - Tweak autotools to build the plugins\r\n\r\nQuestions:\r\n - Is putting the plugins on the path ok? Should they instead live in a known directory like stage1s can? Maybe support both?\r\n - Does the config look versatile enough? Should there be more things in its schema?\r\n\r\nTo try it out:\r\n - `go build -o rkt-fetcher-docker rkt/image/fetchers/remote-aci/main.go`\r\n - put `rkt-fetcher-docker` on your path\r\n - build this version of rkt\r\n - fetch something\r\n\r\nRelated issue: https://github.com/coreos/rkt/issues/1831","created_at":"2016-06-22T22:24:01Z","updated_at":"2016-06-29T06:46:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9e501e815b168af36895e7b2a4f7b6c95bdd2910","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/coreos/rkt/pulls/2830/commits","review_comments_url":"https://api.github.com/repos/coreos/rkt/pulls/2830/comments","review_comment_url":"https://api.github.com/repos/coreos/rkt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coreos/rkt/issues/2830/comments","statuses_url":"https://api.github.com/repos/coreos/rkt/statuses/7a930d3540acba51b5726af1cf8ddbdb39002964","head":{"label":"dgonyeo:fetching-plugins","ref":"fetching-plugins","sha":"7a930d3540acba51b5726af1cf8ddbdb39002964","user":{"login":"dgonyeo","id":2439413,"avatar_url":"https://avatars.githubusercontent.com/u/2439413?v=3","gravatar_id":"","url":"https://api.github.com/users/dgonyeo","html_url":"https://github.com/dgonyeo","followers_url":"https://api.github.com/users/dgonyeo/followers","following_url":"https://api.github.com/users/dgonyeo/following{/other_user}","gists_url":"https://api.github.com/users/dgonyeo/gists{/gist_id}","starred_url":"https://api.github.com/users/dgonyeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgonyeo/subscriptions","organizations_url":"https://api.github.com/users/dgonyeo/orgs","repos_url":"https://api.github.com/users/dgonyeo/repos","events_url":"https://api.github.com/users/dgonyeo/events{/privacy}","received_events_url":"https://api.github.com/users/dgonyeo/received_events","type":"User","site_admin":false},"repo":{"id":42482618,"name":"rkt","full_name":"dgonyeo/rkt","owner":{"login":"dgonyeo","id":2439413,"avatar_url":"https://avatars.githubusercontent.com/u/2439413?v=3","gravatar_id":"","url":"https://api.github.com/users/dgonyeo","html_url":"https://github.com/dgonyeo","followers_url":"https://api.github.com/users/dgonyeo/followers","following_url":"https://api.github.com/users/dgonyeo/following{/other_user}","gists_url":"https://api.github.com/users/dgonyeo/gists{/gist_id}","starred_url":"https://api.github.com/users/dgonyeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgonyeo/subscriptions","organizations_url":"https://api.github.com/users/dgonyeo/orgs","repos_url":"https://api.github.com/users/dgonyeo/repos","events_url":"https://api.github.com/users/dgonyeo/events{/privacy}","received_events_url":"https://api.github.com/users/dgonyeo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dgonyeo/rkt","description":"rkt is an App Container runtime for Linux","fork":true,"url":"https://api.github.com/repos/dgonyeo/rkt","forks_url":"https://api.github.com/repos/dgonyeo/rkt/forks","keys_url":"https://api.github.com/repos/dgonyeo/rkt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dgonyeo/rkt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dgonyeo/rkt/teams","hooks_url":"https://api.github.com/repos/dgonyeo/rkt/hooks","issue_events_url":"https://api.github.com/repos/dgonyeo/rkt/issues/events{/number}","events_url":"https://api.github.com/repos/dgonyeo/rkt/events","assignees_url":"https://api.github.com/repos/dgonyeo/rkt/assignees{/user}","branches_url":"https://api.github.com/repos/dgonyeo/rkt/branches{/branch}","tags_url":"https://api.github.com/repos/dgonyeo/rkt/tags","blobs_url":"https://api.github.com/repos/dgonyeo/rkt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dgonyeo/rkt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dgonyeo/rkt/git/refs{/sha}","trees_url":"https://api.github.com/repos/dgonyeo/rkt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dgonyeo/rkt/statuses/{sha}","languages_url":"https://api.github.com/repos/dgonyeo/rkt/languages","stargazers_url":"https://api.github.com/repos/dgonyeo/rkt/stargazers","contributors_url":"https://api.github.com/repos/dgonyeo/rkt/contributors","subscribers_url":"https://api.github.com/repos/dgonyeo/rkt/subscribers","subscription_url":"https://api.github.com/repos/dgonyeo/rkt/subscription","commits_url":"https://api.github.com/repos/dgonyeo/rkt/commits{/sha}","git_commits_url":"https://api.github.com/repos/dgonyeo/rkt/git/commits{/sha}","comments_url":"https://api.github.com/repos/dgonyeo/rkt/comments{/number}","issue_comment_url":"https://api.github.com/repos/dgonyeo/rkt/issues/comments{/number}","contents_url":"https://api.github.com/repos/dgonyeo/rkt/contents/{+path}","compare_url":"https://api.github.com/repos/dgonyeo/rkt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dgonyeo/rkt/merges","archive_url":"https://api.github.com/repos/dgonyeo/rkt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dgonyeo/rkt/downloads","issues_url":"https://api.github.com/repos/dgonyeo/rkt/issues{/number}","pulls_url":"https://api.github.com/repos/dgonyeo/rkt/pulls{/number}","milestones_url":"https://api.github.com/repos/dgonyeo/rkt/milestones{/number}","notifications_url":"https://api.github.com/repos/dgonyeo/rkt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dgonyeo/rkt/labels{/name}","releases_url":"https://api.github.com/repos/dgonyeo/rkt/releases{/id}","deployments_url":"https://api.github.com/repos/dgonyeo/rkt/deployments","created_at":"2015-09-14T23:20:28Z","updated_at":"2016-03-24T18:59:07Z","pushed_at":"2016-06-28T23:36:28Z","git_url":"git://github.com/dgonyeo/rkt.git","ssh_url":"git@github.com:dgonyeo/rkt.git","clone_url":"https://github.com/dgonyeo/rkt.git","svn_url":"https://github.com/dgonyeo/rkt","homepage":"","size":21821,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"coreos:master","ref":"master","sha":"7b1eba6f9b7ba99dc82b7052bf645a945d37814e","user":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"repo":{"id":26509369,"name":"rkt","full_name":"coreos/rkt","owner":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coreos/rkt","description":"rkt is an App Container runtime for Linux","fork":false,"url":"https://api.github.com/repos/coreos/rkt","forks_url":"https://api.github.com/repos/coreos/rkt/forks","keys_url":"https://api.github.com/repos/coreos/rkt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreos/rkt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreos/rkt/teams","hooks_url":"https://api.github.com/repos/coreos/rkt/hooks","issue_events_url":"https://api.github.com/repos/coreos/rkt/issues/events{/number}","events_url":"https://api.github.com/repos/coreos/rkt/events","assignees_url":"https://api.github.com/repos/coreos/rkt/assignees{/user}","branches_url":"https://api.github.com/repos/coreos/rkt/branches{/branch}","tags_url":"https://api.github.com/repos/coreos/rkt/tags","blobs_url":"https://api.github.com/repos/coreos/rkt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreos/rkt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreos/rkt/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreos/rkt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreos/rkt/statuses/{sha}","languages_url":"https://api.github.com/repos/coreos/rkt/languages","stargazers_url":"https://api.github.com/repos/coreos/rkt/stargazers","contributors_url":"https://api.github.com/repos/coreos/rkt/contributors","subscribers_url":"https://api.github.com/repos/coreos/rkt/subscribers","subscription_url":"https://api.github.com/repos/coreos/rkt/subscription","commits_url":"https://api.github.com/repos/coreos/rkt/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreos/rkt/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreos/rkt/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreos/rkt/issues/comments{/number}","contents_url":"https://api.github.com/repos/coreos/rkt/contents/{+path}","compare_url":"https://api.github.com/repos/coreos/rkt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreos/rkt/merges","archive_url":"https://api.github.com/repos/coreos/rkt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreos/rkt/downloads","issues_url":"https://api.github.com/repos/coreos/rkt/issues{/number}","pulls_url":"https://api.github.com/repos/coreos/rkt/pulls{/number}","milestones_url":"https://api.github.com/repos/coreos/rkt/milestones{/number}","notifications_url":"https://api.github.com/repos/coreos/rkt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreos/rkt/labels{/name}","releases_url":"https://api.github.com/repos/coreos/rkt/releases{/id}","deployments_url":"https://api.github.com/repos/coreos/rkt/deployments","created_at":"2014-11-11T23:13:18Z","updated_at":"2016-06-29T06:06:47Z","pushed_at":"2016-06-28T23:52:44Z","git_url":"git://github.com/coreos/rkt.git","ssh_url":"git@github.com:coreos/rkt.git","clone_url":"https://github.com/coreos/rkt.git","svn_url":"https://github.com/coreos/rkt","homepage":"","size":28400,"stargazers_count":5661,"watchers_count":5661,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":537,"mirror_url":null,"open_issues_count":339,"forks":537,"open_issues":339,"watchers":5661,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/rkt/pulls/2830"},"html":{"href":"https://github.com/coreos/rkt/pull/2830"},"issue":{"href":"https://api.github.com/repos/coreos/rkt/issues/2830"},"comments":{"href":"https://api.github.com/repos/coreos/rkt/issues/2830/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/rkt/pulls/2830/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/rkt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coreos/rkt/pulls/2830/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/rkt/statuses/7a930d3540acba51b5726af1cf8ddbdb39002964"}}}}
{"actor":{"display_login":"s-urbaniak"}}