{"action":"created","comment":{"url":"https://api.github.com/repos/flynn/flynn/pulls/comments/38803606","id":38803606,"diff_hunk":"@@ -0,0 +1,125 @@\n+package main\n+\n+import (\n+\t\"crypto/md5\"\n+\t\"encoding/hex\"\n+\t\"errors\"\n+\t\"fmt\"\n+\t\"io\"\n+\t\"net\"\n+\t\"net/url\"\n+\t\"os\"\n+\t\"os/exec\"\n+\t\"syscall\"\n+)\n+\n+func main() {\n+\tm := NewMain()\n+\tif err := m.Run(os.Args[1:]...); err != nil {\n+\t\tfmt.Println(err)\n+\t\tos.Exit(-1)","path":"appliance/discoverd-wrapper/main.go","position":20,"original_position":20,"commit_id":"518b761f2d721ba292f94f014471878bc04de128","original_commit_id":"518b761f2d721ba292f94f014471878bc04de128","user":{"login":"titanous","id":13026,"avatar_url":"https://avatars.githubusercontent.com/u/13026?v=3","gravatar_id":"","url":"https://api.github.com/users/titanous","html_url":"https://github.com/titanous","followers_url":"https://api.github.com/users/titanous/followers","following_url":"https://api.github.com/users/titanous/following{/other_user}","gists_url":"https://api.github.com/users/titanous/gists{/gist_id}","starred_url":"https://api.github.com/users/titanous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/titanous/subscriptions","organizations_url":"https://api.github.com/users/titanous/orgs","repos_url":"https://api.github.com/users/titanous/repos","events_url":"https://api.github.com/users/titanous/events{/privacy}","received_events_url":"https://api.github.com/users/titanous/received_events","type":"User","site_admin":false},"body":"The `-1` exit code looks weird, what is the reason for it?","created_at":"2015-09-04T23:54:15Z","updated_at":"2015-09-04T23:54:15Z","html_url":"https://github.com/flynn/flynn/pull/1612#discussion_r38803606","pull_request_url":"https://api.github.com/repos/flynn/flynn/pulls/1612","_links":{"self":{"href":"https://api.github.com/repos/flynn/flynn/pulls/comments/38803606"},"html":{"href":"https://github.com/flynn/flynn/pull/1612#discussion_r38803606"},"pull_request":{"href":"https://api.github.com/repos/flynn/flynn/pulls/1612"}}},"pull_request":{"url":"https://api.github.com/repos/flynn/flynn/pulls/1612","id":38339701,"html_url":"https://github.com/flynn/flynn/pull/1612","diff_url":"https://github.com/flynn/flynn/pull/1612.diff","patch_url":"https://github.com/flynn/flynn/pull/1612.patch","issue_url":"https://api.github.com/repos/flynn/flynn/issues/1612","number":1612,"state":"open","locked":false,"title":"discoverd hashicorp/raft","user":{"login":"benbjohnson","id":118015,"avatar_url":"https://avatars.githubusercontent.com/u/118015?v=3","gravatar_id":"","url":"https://api.github.com/users/benbjohnson","html_url":"https://github.com/benbjohnson","followers_url":"https://api.github.com/users/benbjohnson/followers","following_url":"https://api.github.com/users/benbjohnson/following{/other_user}","gists_url":"https://api.github.com/users/benbjohnson/gists{/gist_id}","starred_url":"https://api.github.com/users/benbjohnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benbjohnson/subscriptions","organizations_url":"https://api.github.com/users/benbjohnson/orgs","repos_url":"https://api.github.com/users/benbjohnson/repos","events_url":"https://api.github.com/users/benbjohnson/events{/privacy}","received_events_url":"https://api.github.com/users/benbjohnson/received_events","type":"User","site_admin":false},"body":"Overview ![status](https://img.shields.io/badge/status-WIP-red.svg)\r\n=======\r\n\r\nThis pull request replaces the `etcd` service dependency in discoverd with a built-in [Raft implementation](https://github.com/hashicorp/raft). Previously, discoverd required internal state to be maintained by the `server.State` object which was kept in sync with the `etcd` server. Now the state is held inside the Raft cluster so the `State` and `Backend` objects were merged together into a `Store` object.\r\n\r\n\r\n### Notes\r\n\r\nMerging the state and backend together caused all the tests to break. The test suite previously contained mostly multi-step integration tests which made it difficult to narrow down the source of errors that were occurring. After struggling with debugging the errors, I refactored the test suite into unit tests to limit the scope of each test and used the standard library testing package.\r\n\r\n\r\n### TODO\r\n\r\n- [x] Cluster join flags on `discoverd`.\r\n- [x] Build discoverd using `tup`.\r\n- [x] CLI testing\r\n- [x] Integration testing","created_at":"2015-06-23T14:02:23Z","updated_at":"2015-09-04T23:54:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c44b85ee5904c5620b080560d04d978646788e0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/flynn/flynn/pulls/1612/commits","review_comments_url":"https://api.github.com/repos/flynn/flynn/pulls/1612/comments","review_comment_url":"https://api.github.com/repos/flynn/flynn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flynn/flynn/issues/1612/comments","statuses_url":"https://api.github.com/repos/flynn/flynn/statuses/518b761f2d721ba292f94f014471878bc04de128","head":{"label":"benbjohnson:discoverd-raft","ref":"discoverd-raft","sha":"518b761f2d721ba292f94f014471878bc04de128","user":{"login":"benbjohnson","id":118015,"avatar_url":"https://avatars.githubusercontent.com/u/118015?v=3","gravatar_id":"","url":"https://api.github.com/users/benbjohnson","html_url":"https://github.com/benbjohnson","followers_url":"https://api.github.com/users/benbjohnson/followers","following_url":"https://api.github.com/users/benbjohnson/following{/other_user}","gists_url":"https://api.github.com/users/benbjohnson/gists{/gist_id}","starred_url":"https://api.github.com/users/benbjohnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benbjohnson/subscriptions","organizations_url":"https://api.github.com/users/benbjohnson/orgs","repos_url":"https://api.github.com/users/benbjohnson/repos","events_url":"https://api.github.com/users/benbjohnson/events{/privacy}","received_events_url":"https://api.github.com/users/benbjohnson/received_events","type":"User","site_admin":false},"repo":{"id":37075032,"name":"flynn","full_name":"benbjohnson/flynn","owner":{"login":"benbjohnson","id":118015,"avatar_url":"https://avatars.githubusercontent.com/u/118015?v=3","gravatar_id":"","url":"https://api.github.com/users/benbjohnson","html_url":"https://github.com/benbjohnson","followers_url":"https://api.github.com/users/benbjohnson/followers","following_url":"https://api.github.com/users/benbjohnson/following{/other_user}","gists_url":"https://api.github.com/users/benbjohnson/gists{/gist_id}","starred_url":"https://api.github.com/users/benbjohnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benbjohnson/subscriptions","organizations_url":"https://api.github.com/users/benbjohnson/orgs","repos_url":"https://api.github.com/users/benbjohnson/repos","events_url":"https://api.github.com/users/benbjohnson/events{/privacy}","received_events_url":"https://api.github.com/users/benbjohnson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benbjohnson/flynn","description":"A next generation open source platform as a service (PaaS)","fork":true,"url":"https://api.github.com/repos/benbjohnson/flynn","forks_url":"https://api.github.com/repos/benbjohnson/flynn/forks","keys_url":"https://api.github.com/repos/benbjohnson/flynn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benbjohnson/flynn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benbjohnson/flynn/teams","hooks_url":"https://api.github.com/repos/benbjohnson/flynn/hooks","issue_events_url":"https://api.github.com/repos/benbjohnson/flynn/issues/events{/number}","events_url":"https://api.github.com/repos/benbjohnson/flynn/events","assignees_url":"https://api.github.com/repos/benbjohnson/flynn/assignees{/user}","branches_url":"https://api.github.com/repos/benbjohnson/flynn/branches{/branch}","tags_url":"https://api.github.com/repos/benbjohnson/flynn/tags","blobs_url":"https://api.github.com/repos/benbjohnson/flynn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benbjohnson/flynn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benbjohnson/flynn/git/refs{/sha}","trees_url":"https://api.github.com/repos/benbjohnson/flynn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benbjohnson/flynn/statuses/{sha}","languages_url":"https://api.github.com/repos/benbjohnson/flynn/languages","stargazers_url":"https://api.github.com/repos/benbjohnson/flynn/stargazers","contributors_url":"https://api.github.com/repos/benbjohnson/flynn/contributors","subscribers_url":"https://api.github.com/repos/benbjohnson/flynn/subscribers","subscription_url":"https://api.github.com/repos/benbjohnson/flynn/subscription","commits_url":"https://api.github.com/repos/benbjohnson/flynn/commits{/sha}","git_commits_url":"https://api.github.com/repos/benbjohnson/flynn/git/commits{/sha}","comments_url":"https://api.github.com/repos/benbjohnson/flynn/comments{/number}","issue_comment_url":"https://api.github.com/repos/benbjohnson/flynn/issues/comments{/number}","contents_url":"https://api.github.com/repos/benbjohnson/flynn/contents/{+path}","compare_url":"https://api.github.com/repos/benbjohnson/flynn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benbjohnson/flynn/merges","archive_url":"https://api.github.com/repos/benbjohnson/flynn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benbjohnson/flynn/downloads","issues_url":"https://api.github.com/repos/benbjohnson/flynn/issues{/number}","pulls_url":"https://api.github.com/repos/benbjohnson/flynn/pulls{/number}","milestones_url":"https://api.github.com/repos/benbjohnson/flynn/milestones{/number}","notifications_url":"https://api.github.com/repos/benbjohnson/flynn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benbjohnson/flynn/labels{/name}","releases_url":"https://api.github.com/repos/benbjohnson/flynn/releases{/id}","created_at":"2015-06-08T15:21:36Z","updated_at":"2015-06-08T15:21:38Z","pushed_at":"2015-09-04T23:10:05Z","git_url":"git://github.com/benbjohnson/flynn.git","ssh_url":"git@github.com:benbjohnson/flynn.git","clone_url":"https://github.com/benbjohnson/flynn.git","svn_url":"https://github.com/benbjohnson/flynn","homepage":"https://flynn.io","size":18116,"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":"flynn:master","ref":"master","sha":"3e25b65c5919f07d955f69eda6b6079dcee60480","user":{"login":"flynn","id":4973613,"avatar_url":"https://avatars.githubusercontent.com/u/4973613?v=3","gravatar_id":"","url":"https://api.github.com/users/flynn","html_url":"https://github.com/flynn","followers_url":"https://api.github.com/users/flynn/followers","following_url":"https://api.github.com/users/flynn/following{/other_user}","gists_url":"https://api.github.com/users/flynn/gists{/gist_id}","starred_url":"https://api.github.com/users/flynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flynn/subscriptions","organizations_url":"https://api.github.com/users/flynn/orgs","repos_url":"https://api.github.com/users/flynn/repos","events_url":"https://api.github.com/users/flynn/events{/privacy}","received_events_url":"https://api.github.com/users/flynn/received_events","type":"Organization","site_admin":false},"repo":{"id":11290232,"name":"flynn","full_name":"flynn/flynn","owner":{"login":"flynn","id":4973613,"avatar_url":"https://avatars.githubusercontent.com/u/4973613?v=3","gravatar_id":"","url":"https://api.github.com/users/flynn","html_url":"https://github.com/flynn","followers_url":"https://api.github.com/users/flynn/followers","following_url":"https://api.github.com/users/flynn/following{/other_user}","gists_url":"https://api.github.com/users/flynn/gists{/gist_id}","starred_url":"https://api.github.com/users/flynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flynn/subscriptions","organizations_url":"https://api.github.com/users/flynn/orgs","repos_url":"https://api.github.com/users/flynn/repos","events_url":"https://api.github.com/users/flynn/events{/privacy}","received_events_url":"https://api.github.com/users/flynn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flynn/flynn","description":"A next generation open source platform as a service (PaaS)","fork":false,"url":"https://api.github.com/repos/flynn/flynn","forks_url":"https://api.github.com/repos/flynn/flynn/forks","keys_url":"https://api.github.com/repos/flynn/flynn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flynn/flynn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flynn/flynn/teams","hooks_url":"https://api.github.com/repos/flynn/flynn/hooks","issue_events_url":"https://api.github.com/repos/flynn/flynn/issues/events{/number}","events_url":"https://api.github.com/repos/flynn/flynn/events","assignees_url":"https://api.github.com/repos/flynn/flynn/assignees{/user}","branches_url":"https://api.github.com/repos/flynn/flynn/branches{/branch}","tags_url":"https://api.github.com/repos/flynn/flynn/tags","blobs_url":"https://api.github.com/repos/flynn/flynn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flynn/flynn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flynn/flynn/git/refs{/sha}","trees_url":"https://api.github.com/repos/flynn/flynn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flynn/flynn/statuses/{sha}","languages_url":"https://api.github.com/repos/flynn/flynn/languages","stargazers_url":"https://api.github.com/repos/flynn/flynn/stargazers","contributors_url":"https://api.github.com/repos/flynn/flynn/contributors","subscribers_url":"https://api.github.com/repos/flynn/flynn/subscribers","subscription_url":"https://api.github.com/repos/flynn/flynn/subscription","commits_url":"https://api.github.com/repos/flynn/flynn/commits{/sha}","git_commits_url":"https://api.github.com/repos/flynn/flynn/git/commits{/sha}","comments_url":"https://api.github.com/repos/flynn/flynn/comments{/number}","issue_comment_url":"https://api.github.com/repos/flynn/flynn/issues/comments{/number}","contents_url":"https://api.github.com/repos/flynn/flynn/contents/{+path}","compare_url":"https://api.github.com/repos/flynn/flynn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flynn/flynn/merges","archive_url":"https://api.github.com/repos/flynn/flynn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flynn/flynn/downloads","issues_url":"https://api.github.com/repos/flynn/flynn/issues{/number}","pulls_url":"https://api.github.com/repos/flynn/flynn/pulls{/number}","milestones_url":"https://api.github.com/repos/flynn/flynn/milestones{/number}","notifications_url":"https://api.github.com/repos/flynn/flynn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flynn/flynn/labels{/name}","releases_url":"https://api.github.com/repos/flynn/flynn/releases{/id}","created_at":"2013-07-09T18:22:06Z","updated_at":"2015-09-04T20:39:31Z","pushed_at":"2015-09-04T23:10:06Z","git_url":"git://github.com/flynn/flynn.git","ssh_url":"git@github.com:flynn/flynn.git","clone_url":"https://github.com/flynn/flynn.git","svn_url":"https://github.com/flynn/flynn","homepage":"https://flynn.io","size":59822,"stargazers_count":3839,"watchers_count":3839,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":268,"mirror_url":null,"open_issues_count":215,"forks":268,"open_issues":215,"watchers":3839,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flynn/flynn/pulls/1612"},"html":{"href":"https://github.com/flynn/flynn/pull/1612"},"issue":{"href":"https://api.github.com/repos/flynn/flynn/issues/1612"},"comments":{"href":"https://api.github.com/repos/flynn/flynn/issues/1612/comments"},"review_comments":{"href":"https://api.github.com/repos/flynn/flynn/pulls/1612/comments"},"review_comment":{"href":"https://api.github.com/repos/flynn/flynn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flynn/flynn/pulls/1612/commits"},"statuses":{"href":"https://api.github.com/repos/flynn/flynn/statuses/518b761f2d721ba292f94f014471878bc04de128"}}}}