GitHub PullRequestReviewCommentEvent at 2014-09-24 00:19:36
Repository: etcd
Actor: jonboulle
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/coreos/etcd/pulls/comments/17947938","id":17947938,"diff_hunk":"@@ -301,25 +315,52 @@ func writeEvent(w http.ResponseWriter, ev *store.Event) error {\n \treturn json.NewEncoder(w).Encode(ev)\n }\n \n-// waitForEvent waits for a given Watcher to return its associated\n-// event. It returns a non-nil error if the given Context times out\n-// or the given ResponseWriter triggers a CloseNotify.\n-func waitForEvent(ctx context.Context, w http.ResponseWriter, wa store.Watcher) (*store.Event, error) {\n-\t// TODO(bmizerany): support streaming?\n+func handleWatch(ctx context.Context, w http.ResponseWriter, wa store.Watcher, stream bool) {\n \tdefer wa.Remove()\n+\tech := wa.EventChan()\n \tvar nch <-chan bool\n \tif x, ok := w.(http.CloseNotifier); ok {\n \t\tnch = x.CloseNotify()\n \t}\n-\tselect {\n-\tcase ev := <-wa.EventChan():\n-\t\treturn ev, nil\n-\tcase <-nch:\n-\t\telog.TODO()\n-\t\treturn nil, errClosed\n-\tcase <-ctx.Done():\n-\t\treturn nil, ctx.Err()\n+\n+\tw.Header().Set(\"Content-Type\", \"application/json\")\n+\t// WriteHeader will do this implicitly, but best to be explicit.","path":"etcdserver/etcdhttp/http.go","position":142,"original_position":142,"commit_id":"fe18cc288cd66807d6d013a97ee4ae2966866d25","original_commit_id":"fe18cc288cd66807d6d013a97ee4ae2966866d25","user":{"login":"jonboulle","id":2601015,"avatar_url":"https://avatars.githubusercontent.com/u/2601015?v=2","gravatar_id":"","url":"https://api.github.com/users/jonboulle","html_url":"https://github.com/jonboulle","followers_url":"https://api.github.com/users/jonboulle/followers","following_url":"https://api.github.com/users/jonboulle/following{/other_user}","gists_url":"https://api.github.com/users/jonboulle/gists{/gist_id}","starred_url":"https://api.github.com/users/jonboulle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonboulle/subscriptions","organizations_url":"https://api.github.com/users/jonboulle/orgs","repos_url":"https://api.github.com/users/jonboulle/repos","events_url":"https://api.github.com/users/jonboulle/events{/privacy}","received_events_url":"https://api.github.com/users/jonboulle/received_events","type":"User","site_admin":false},"body":"anyone know how to deal with this?","created_at":"2014-09-24T00:19:36Z","updated_at":"2014-09-24T00:19:36Z","html_url":"https://github.com/coreos/etcd/pull/1138#discussion_r17947938","pull_request_url":"https://api.github.com/repos/coreos/etcd/pulls/1138","_links":{"self":{"href":"https://api.github.com/repos/coreos/etcd/pulls/comments/17947938"},"html":{"href":"https://github.com/coreos/etcd/pull/1138#discussion_r17947938"},"pull_request":{"href":"https://api.github.com/repos/coreos/etcd/pulls/1138"}}},"pull_request":{"url":"https://api.github.com/repos/coreos/etcd/pulls/1138","id":21622329,"html_url":"https://github.com/coreos/etcd/pull/1138","diff_url":"https://github.com/coreos/etcd/pull/1138.diff","patch_url":"https://github.com/coreos/etcd/pull/1138.patch","issue_url":"https://api.github.com/repos/coreos/etcd/issues/1138","number":1138,"state":"open","locked":false,"title":"etcdserver: handle watch timeouts and streaming","user":{"login":"jonboulle","id":2601015,"avatar_url":"https://avatars.githubusercontent.com/u/2601015?v=2","gravatar_id":"","url":"https://api.github.com/users/jonboulle","html_url":"https://github.com/jonboulle","followers_url":"https://api.github.com/users/jonboulle/followers","following_url":"https://api.github.com/users/jonboulle/following{/other_user}","gists_url":"https://api.github.com/users/jonboulle/gists{/gist_id}","starred_url":"https://api.github.com/users/jonboulle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonboulle/subscriptions","organizations_url":"https://api.github.com/users/jonboulle/orgs","repos_url":"https://api.github.com/users/jonboulle/repos","events_url":"https://api.github.com/users/jonboulle/events{/privacy}","received_events_url":"https://api.github.com/users/jonboulle/received_events","type":"User","site_admin":false},"body":"```\r\n; time curl localhost:4001/v2/keys?wait=true\r\ncontext deadline exceeded\r\n\r\nreal\t0m10.009s\r\nuser\t0m0.004s\r\nsys\t0m0.001s\r\n```","created_at":"2014-09-23T02:38:00Z","updated_at":"2014-09-24T00:19:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b98647c60f11145dd89cfde9f291ea1276f09de7","assignee":null,"milestone":{"url":"https://api.github.com/repos/coreos/etcd/milestones/5","labels_url":"https://api.github.com/repos/coreos/etcd/milestones/5/labels","id":782754,"number":5,"title":"v0.5.0-RC","description":"v0.5 release candidate","creator":{"login":"jonboulle","id":2601015,"avatar_url":"https://avatars.githubusercontent.com/u/2601015?v=2","gravatar_id":"","url":"https://api.github.com/users/jonboulle","html_url":"https://github.com/jonboulle","followers_url":"https://api.github.com/users/jonboulle/followers","following_url":"https://api.github.com/users/jonboulle/following{/other_user}","gists_url":"https://api.github.com/users/jonboulle/gists{/gist_id}","starred_url":"https://api.github.com/users/jonboulle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonboulle/subscriptions","organizations_url":"https://api.github.com/users/jonboulle/orgs","repos_url":"https://api.github.com/users/jonboulle/repos","events_url":"https://api.github.com/users/jonboulle/events{/privacy}","received_events_url":"https://api.github.com/users/jonboulle/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":31,"state":"open","created_at":"2014-09-08T21:14:05Z","updated_at":"2014-09-23T23:13:19Z","due_on":"2014-09-22T07:00:00Z"},"commits_url":"https://api.github.com/repos/coreos/etcd/pulls/1138/commits","review_comments_url":"https://api.github.com/repos/coreos/etcd/pulls/1138/comments","review_comment_url":"https://api.github.com/repos/coreos/etcd/pulls/comments/{number}","comments_url":"https://api.github.com/repos/coreos/etcd/issues/1138/comments","statuses_url":"https://api.github.com/repos/coreos/etcd/statuses/fe18cc288cd66807d6d013a97ee4ae2966866d25","head":{"label":"jonboulle:1138_timeout","ref":"1138_timeout","sha":"fe18cc288cd66807d6d013a97ee4ae2966866d25","user":{"login":"jonboulle","id":2601015,"avatar_url":"https://avatars.githubusercontent.com/u/2601015?v=2","gravatar_id":"","url":"https://api.github.com/users/jonboulle","html_url":"https://github.com/jonboulle","followers_url":"https://api.github.com/users/jonboulle/followers","following_url":"https://api.github.com/users/jonboulle/following{/other_user}","gists_url":"https://api.github.com/users/jonboulle/gists{/gist_id}","starred_url":"https://api.github.com/users/jonboulle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonboulle/subscriptions","organizations_url":"https://api.github.com/users/jonboulle/orgs","repos_url":"https://api.github.com/users/jonboulle/repos","events_url":"https://api.github.com/users/jonboulle/events{/privacy}","received_events_url":"https://api.github.com/users/jonboulle/received_events","type":"User","site_admin":false},"repo":{"id":16238846,"name":"etcd","full_name":"jonboulle/etcd","owner":{"login":"jonboulle","id":2601015,"avatar_url":"https://avatars.githubusercontent.com/u/2601015?v=2","gravatar_id":"","url":"https://api.github.com/users/jonboulle","html_url":"https://github.com/jonboulle","followers_url":"https://api.github.com/users/jonboulle/followers","following_url":"https://api.github.com/users/jonboulle/following{/other_user}","gists_url":"https://api.github.com/users/jonboulle/gists{/gist_id}","starred_url":"https://api.github.com/users/jonboulle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonboulle/subscriptions","organizations_url":"https://api.github.com/users/jonboulle/orgs","repos_url":"https://api.github.com/users/jonboulle/repos","events_url":"https://api.github.com/users/jonboulle/events{/privacy}","received_events_url":"https://api.github.com/users/jonboulle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonboulle/etcd","description":"A highly-available key value store for shared configuration and service discovery","fork":true,"url":"https://api.github.com/repos/jonboulle/etcd","forks_url":"https://api.github.com/repos/jonboulle/etcd/forks","keys_url":"https://api.github.com/repos/jonboulle/etcd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonboulle/etcd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonboulle/etcd/teams","hooks_url":"https://api.github.com/repos/jonboulle/etcd/hooks","issue_events_url":"https://api.github.com/repos/jonboulle/etcd/issues/events{/number}","events_url":"https://api.github.com/repos/jonboulle/etcd/events","assignees_url":"https://api.github.com/repos/jonboulle/etcd/assignees{/user}","branches_url":"https://api.github.com/repos/jonboulle/etcd/branches{/branch}","tags_url":"https://api.github.com/repos/jonboulle/etcd/tags","blobs_url":"https://api.github.com/repos/jonboulle/etcd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonboulle/etcd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonboulle/etcd/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonboulle/etcd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonboulle/etcd/statuses/{sha}","languages_url":"https://api.github.com/repos/jonboulle/etcd/languages","stargazers_url":"https://api.github.com/repos/jonboulle/etcd/stargazers","contributors_url":"https://api.github.com/repos/jonboulle/etcd/contributors","subscribers_url":"https://api.github.com/repos/jonboulle/etcd/subscribers","subscription_url":"https://api.github.com/repos/jonboulle/etcd/subscription","commits_url":"https://api.github.com/repos/jonboulle/etcd/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonboulle/etcd/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonboulle/etcd/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonboulle/etcd/issues/comments/{number}","contents_url":"https://api.github.com/repos/jonboulle/etcd/contents/{+path}","compare_url":"https://api.github.com/repos/jonboulle/etcd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonboulle/etcd/merges","archive_url":"https://api.github.com/repos/jonboulle/etcd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonboulle/etcd/downloads","issues_url":"https://api.github.com/repos/jonboulle/etcd/issues{/number}","pulls_url":"https://api.github.com/repos/jonboulle/etcd/pulls{/number}","milestones_url":"https://api.github.com/repos/jonboulle/etcd/milestones{/number}","notifications_url":"https://api.github.com/repos/jonboulle/etcd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonboulle/etcd/labels{/name}","releases_url":"https://api.github.com/repos/jonboulle/etcd/releases{/id}","created_at":"2014-01-25T20:07:46Z","updated_at":"2014-09-04T19:32:13Z","pushed_at":"2014-09-24T00:16:24Z","git_url":"git://github.com/jonboulle/etcd.git","ssh_url":"git@github.com:jonboulle/etcd.git","clone_url":"https://github.com/jonboulle/etcd.git","svn_url":"https://github.com/jonboulle/etcd","homepage":"","size":11573,"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":"03152004d75a5d2d528afabc5d911c566f68f198","user":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=2","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":11225014,"name":"etcd","full_name":"coreos/etcd","owner":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=2","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/etcd","description":"A highly-available key value store for shared configuration and service discovery","fork":false,"url":"https://api.github.com/repos/coreos/etcd","forks_url":"https://api.github.com/repos/coreos/etcd/forks","keys_url":"https://api.github.com/repos/coreos/etcd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreos/etcd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreos/etcd/teams","hooks_url":"https://api.github.com/repos/coreos/etcd/hooks","issue_events_url":"https://api.github.com/repos/coreos/etcd/issues/events{/number}","events_url":"https://api.github.com/repos/coreos/etcd/events","assignees_url":"https://api.github.com/repos/coreos/etcd/assignees{/user}","branches_url":"https://api.github.com/repos/coreos/etcd/branches{/branch}","tags_url":"https://api.github.com/repos/coreos/etcd/tags","blobs_url":"https://api.github.com/repos/coreos/etcd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreos/etcd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreos/etcd/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreos/etcd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreos/etcd/statuses/{sha}","languages_url":"https://api.github.com/repos/coreos/etcd/languages","stargazers_url":"https://api.github.com/repos/coreos/etcd/stargazers","contributors_url":"https://api.github.com/repos/coreos/etcd/contributors","subscribers_url":"https://api.github.com/repos/coreos/etcd/subscribers","subscription_url":"https://api.github.com/repos/coreos/etcd/subscription","commits_url":"https://api.github.com/repos/coreos/etcd/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreos/etcd/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreos/etcd/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreos/etcd/issues/comments/{number}","contents_url":"https://api.github.com/repos/coreos/etcd/contents/{+path}","compare_url":"https://api.github.com/repos/coreos/etcd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreos/etcd/merges","archive_url":"https://api.github.com/repos/coreos/etcd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreos/etcd/downloads","issues_url":"https://api.github.com/repos/coreos/etcd/issues{/number}","pulls_url":"https://api.github.com/repos/coreos/etcd/pulls{/number}","milestones_url":"https://api.github.com/repos/coreos/etcd/milestones{/number}","notifications_url":"https://api.github.com/repos/coreos/etcd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreos/etcd/labels{/name}","releases_url":"https://api.github.com/repos/coreos/etcd/releases{/id}","created_at":"2013-07-06T21:57:21Z","updated_at":"2014-09-23T19:59:26Z","pushed_at":"2014-09-23T23:13:19Z","git_url":"git://github.com/coreos/etcd.git","ssh_url":"git@github.com:coreos/etcd.git","clone_url":"https://github.com/coreos/etcd.git","svn_url":"https://github.com/coreos/etcd","homepage":"","size":23470,"stargazers_count":4253,"watchers_count":4253,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":424,"mirror_url":null,"open_issues_count":128,"forks":424,"open_issues":128,"watchers":4253,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/etcd/pulls/1138"},"html":{"href":"https://github.com/coreos/etcd/pull/1138"},"issue":{"href":"https://api.github.com/repos/coreos/etcd/issues/1138"},"comments":{"href":"https://api.github.com/repos/coreos/etcd/issues/1138/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/etcd/pulls/1138/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/etcd/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/coreos/etcd/pulls/1138/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/etcd/statuses/fe18cc288cd66807d6d013a97ee4ae2966866d25"}}}}