{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/test-infra/pulls/comments/191016698","pull_request_review_id":123521569,"id":191016698,"diff_hunk":"@@ -220,5 +221,18 @@ func main() {\n \t// Serve plugin help information from /plugin-help.\n \thttp.Handle(\"/plugin-help\", pluginhelp.NewHelpAgent(pluginAgent, githubClient))\n \n-\tlogrus.Fatal(http.ListenAndServe(\":\"+strconv.Itoa(o.port), nil))\n+\thttpServer := &http.Server{Addr: \":\" + strconv.Itoa(o.port)}\n+\n+\t// Shutdown gracefully on SIGTERM or SIGINT\n+\tgo func() {\n+\t\tsig := make(chan os.Signal, 1)\n+\t\tsignal.Notify(sig, os.Interrupt, syscall.SIGTERM)","path":"prow/cmd/hook/main.go","position":null,"original_position":68,"commit_id":"50cf8077a3cd48da3757108b0ddcfb2527a7865a","original_commit_id":"72cddfccadd781a9710117d92cabc7f852c86572","user":{"login":"paulangton","id":7799565,"avatar_url":"https://avatars3.githubusercontent.com/u/7799565?v=4","gravatar_id":"","url":"https://api.github.com/users/paulangton","html_url":"https://github.com/paulangton","followers_url":"https://api.github.com/users/paulangton/followers","following_url":"https://api.github.com/users/paulangton/following{/other_user}","gists_url":"https://api.github.com/users/paulangton/gists{/gist_id}","starred_url":"https://api.github.com/users/paulangton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulangton/subscriptions","organizations_url":"https://api.github.com/users/paulangton/orgs","repos_url":"https://api.github.com/users/paulangton/repos","events_url":"https://api.github.com/users/paulangton/events{/privacy}","received_events_url":"https://api.github.com/users/paulangton/received_events","type":"User","site_admin":false},"body":"Done!","created_at":"2018-05-25T21:49:11Z","updated_at":"2018-05-25T21:49:11Z","html_url":"https://github.com/kubernetes/test-infra/pull/8126#discussion_r191016698","pull_request_url":"https://api.github.com/repos/kubernetes/test-infra/pulls/8126","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/test-infra/pulls/comments/191016698"},"html":{"href":"https://github.com/kubernetes/test-infra/pull/8126#discussion_r191016698"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/test-infra/pulls/8126"}},"in_reply_to_id":191011583},"pull_request":{"url":"https://api.github.com/repos/kubernetes/test-infra/pulls/8126","id":190390233,"html_url":"https://github.com/kubernetes/test-infra/pull/8126","diff_url":"https://github.com/kubernetes/test-infra/pull/8126.diff","patch_url":"https://github.com/kubernetes/test-infra/pull/8126.patch","issue_url":"https://api.github.com/repos/kubernetes/test-infra/issues/8126","number":8126,"state":"open","locked":false,"title":"Added graceful shutdown to hook","user":{"login":"paulangton","id":7799565,"avatar_url":"https://avatars3.githubusercontent.com/u/7799565?v=4","gravatar_id":"","url":"https://api.github.com/users/paulangton","html_url":"https://github.com/paulangton","followers_url":"https://api.github.com/users/paulangton/followers","following_url":"https://api.github.com/users/paulangton/following{/other_user}","gists_url":"https://api.github.com/users/paulangton/gists{/gist_id}","starred_url":"https://api.github.com/users/paulangton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulangton/subscriptions","organizations_url":"https://api.github.com/users/paulangton/orgs","repos_url":"https://api.github.com/users/paulangton/repos","events_url":"https://api.github.com/users/paulangton/events{/privacy}","received_events_url":"https://api.github.com/users/paulangton/received_events","type":"User","site_admin":false},"body":"A fix for #3396. Uses a WaitGroup that is incremented for every event received that needs to be handled and decremented in each handler. On shutdown, hook waits for all events in the WaitGroup to finish before exiting, or after 180 seconds, whichever comes first. Also accommodates external plugins.","created_at":"2018-05-24T19:07:17Z","updated_at":"2018-05-25T21:49:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d3234fa0ccc4858056cee5489b205298f3287934","assignee":null,"assignees":[],"requested_reviewers":[{"login":"stevekuznetsov","id":7328370,"avatar_url":"https://avatars1.githubusercontent.com/u/7328370?v=4","gravatar_id":"","url":"https://api.github.com/users/stevekuznetsov","html_url":"https://github.com/stevekuznetsov","followers_url":"https://api.github.com/users/stevekuznetsov/followers","following_url":"https://api.github.com/users/stevekuznetsov/following{/other_user}","gists_url":"https://api.github.com/users/stevekuznetsov/gists{/gist_id}","starred_url":"https://api.github.com/users/stevekuznetsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevekuznetsov/subscriptions","organizations_url":"https://api.github.com/users/stevekuznetsov/orgs","repos_url":"https://api.github.com/users/stevekuznetsov/repos","events_url":"https://api.github.com/users/stevekuznetsov/events{/privacy}","received_events_url":"https://api.github.com/users/stevekuznetsov/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":484580953,"url":"https://api.github.com/repos/kubernetes/test-infra/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":671126262,"url":"https://api.github.com/repos/kubernetes/test-infra/labels/size/M","name":"size/M","color":"eebb00","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/test-infra/pulls/8126/commits","review_comments_url":"https://api.github.com/repos/kubernetes/test-infra/pulls/8126/comments","review_comment_url":"https://api.github.com/repos/kubernetes/test-infra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/test-infra/issues/8126/comments","statuses_url":"https://api.github.com/repos/kubernetes/test-infra/statuses/50cf8077a3cd48da3757108b0ddcfb2527a7865a","head":{"label":"paulangton:graceful-hook-shutdown","ref":"graceful-hook-shutdown","sha":"50cf8077a3cd48da3757108b0ddcfb2527a7865a","user":{"login":"paulangton","id":7799565,"avatar_url":"https://avatars3.githubusercontent.com/u/7799565?v=4","gravatar_id":"","url":"https://api.github.com/users/paulangton","html_url":"https://github.com/paulangton","followers_url":"https://api.github.com/users/paulangton/followers","following_url":"https://api.github.com/users/paulangton/following{/other_user}","gists_url":"https://api.github.com/users/paulangton/gists{/gist_id}","starred_url":"https://api.github.com/users/paulangton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulangton/subscriptions","organizations_url":"https://api.github.com/users/paulangton/orgs","repos_url":"https://api.github.com/users/paulangton/repos","events_url":"https://api.github.com/users/paulangton/events{/privacy}","received_events_url":"https://api.github.com/users/paulangton/received_events","type":"User","site_admin":false},"repo":{"id":133848284,"name":"test-infra","full_name":"paulangton/test-infra","owner":{"login":"paulangton","id":7799565,"avatar_url":"https://avatars3.githubusercontent.com/u/7799565?v=4","gravatar_id":"","url":"https://api.github.com/users/paulangton","html_url":"https://github.com/paulangton","followers_url":"https://api.github.com/users/paulangton/followers","following_url":"https://api.github.com/users/paulangton/following{/other_user}","gists_url":"https://api.github.com/users/paulangton/gists{/gist_id}","starred_url":"https://api.github.com/users/paulangton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulangton/subscriptions","organizations_url":"https://api.github.com/users/paulangton/orgs","repos_url":"https://api.github.com/users/paulangton/repos","events_url":"https://api.github.com/users/paulangton/events{/privacy}","received_events_url":"https://api.github.com/users/paulangton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paulangton/test-infra","description":"Test infrastructure for the Kubernetes project.","fork":true,"url":"https://api.github.com/repos/paulangton/test-infra","forks_url":"https://api.github.com/repos/paulangton/test-infra/forks","keys_url":"https://api.github.com/repos/paulangton/test-infra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paulangton/test-infra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paulangton/test-infra/teams","hooks_url":"https://api.github.com/repos/paulangton/test-infra/hooks","issue_events_url":"https://api.github.com/repos/paulangton/test-infra/issues/events{/number}","events_url":"https://api.github.com/repos/paulangton/test-infra/events","assignees_url":"https://api.github.com/repos/paulangton/test-infra/assignees{/user}","branches_url":"https://api.github.com/repos/paulangton/test-infra/branches{/branch}","tags_url":"https://api.github.com/repos/paulangton/test-infra/tags","blobs_url":"https://api.github.com/repos/paulangton/test-infra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paulangton/test-infra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paulangton/test-infra/git/refs{/sha}","trees_url":"https://api.github.com/repos/paulangton/test-infra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paulangton/test-infra/statuses/{sha}","languages_url":"https://api.github.com/repos/paulangton/test-infra/languages","stargazers_url":"https://api.github.com/repos/paulangton/test-infra/stargazers","contributors_url":"https://api.github.com/repos/paulangton/test-infra/contributors","subscribers_url":"https://api.github.com/repos/paulangton/test-infra/subscribers","subscription_url":"https://api.github.com/repos/paulangton/test-infra/subscription","commits_url":"https://api.github.com/repos/paulangton/test-infra/commits{/sha}","git_commits_url":"https://api.github.com/repos/paulangton/test-infra/git/commits{/sha}","comments_url":"https://api.github.com/repos/paulangton/test-infra/comments{/number}","issue_comment_url":"https://api.github.com/repos/paulangton/test-infra/issues/comments{/number}","contents_url":"https://api.github.com/repos/paulangton/test-infra/contents/{+path}","compare_url":"https://api.github.com/repos/paulangton/test-infra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paulangton/test-infra/merges","archive_url":"https://api.github.com/repos/paulangton/test-infra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paulangton/test-infra/downloads","issues_url":"https://api.github.com/repos/paulangton/test-infra/issues{/number}","pulls_url":"https://api.github.com/repos/paulangton/test-infra/pulls{/number}","milestones_url":"https://api.github.com/repos/paulangton/test-infra/milestones{/number}","notifications_url":"https://api.github.com/repos/paulangton/test-infra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paulangton/test-infra/labels{/name}","releases_url":"https://api.github.com/repos/paulangton/test-infra/releases{/id}","deployments_url":"https://api.github.com/repos/paulangton/test-infra/deployments","created_at":"2018-05-17T17:40:39Z","updated_at":"2018-05-25T21:17:33Z","pushed_at":"2018-05-25T21:47:56Z","git_url":"git://github.com/paulangton/test-infra.git","ssh_url":"git@github.com:paulangton/test-infra.git","clone_url":"https://github.com/paulangton/test-infra.git","svn_url":"https://github.com/paulangton/test-infra","homepage":null,"size":52772,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"3e8c8db547549298039a7ccd5069dd85b98d5446","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":57333709,"name":"test-infra","full_name":"kubernetes/test-infra","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/test-infra","description":"Test infrastructure for the Kubernetes project.","fork":false,"url":"https://api.github.com/repos/kubernetes/test-infra","forks_url":"https://api.github.com/repos/kubernetes/test-infra/forks","keys_url":"https://api.github.com/repos/kubernetes/test-infra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/test-infra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/test-infra/teams","hooks_url":"https://api.github.com/repos/kubernetes/test-infra/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/test-infra/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/test-infra/events","assignees_url":"https://api.github.com/repos/kubernetes/test-infra/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/test-infra/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/test-infra/tags","blobs_url":"https://api.github.com/repos/kubernetes/test-infra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/test-infra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/test-infra/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/test-infra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/test-infra/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/test-infra/languages","stargazers_url":"https://api.github.com/repos/kubernetes/test-infra/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/test-infra/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/test-infra/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/test-infra/subscription","commits_url":"https://api.github.com/repos/kubernetes/test-infra/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/test-infra/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/test-infra/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/test-infra/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/test-infra/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/test-infra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/test-infra/merges","archive_url":"https://api.github.com/repos/kubernetes/test-infra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/test-infra/downloads","issues_url":"https://api.github.com/repos/kubernetes/test-infra/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/test-infra/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/test-infra/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/test-infra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/test-infra/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/test-infra/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/test-infra/deployments","created_at":"2016-04-28T21:05:35Z","updated_at":"2018-05-25T21:29:44Z","pushed_at":"2018-05-25T21:47:58Z","git_url":"git://github.com/kubernetes/test-infra.git","ssh_url":"git@github.com:kubernetes/test-infra.git","clone_url":"https://github.com/kubernetes/test-infra.git","svn_url":"https://github.com/kubernetes/test-infra","homepage":null,"size":53600,"stargazers_count":385,"watchers_count":385,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":448,"mirror_url":null,"archived":false,"open_issues_count":321,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":448,"open_issues":321,"watchers":385,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/test-infra/pulls/8126"},"html":{"href":"https://github.com/kubernetes/test-infra/pull/8126"},"issue":{"href":"https://api.github.com/repos/kubernetes/test-infra/issues/8126"},"comments":{"href":"https://api.github.com/repos/kubernetes/test-infra/issues/8126/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/test-infra/pulls/8126/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/test-infra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/test-infra/pulls/8126/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/test-infra/statuses/50cf8077a3cd48da3757108b0ddcfb2527a7865a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"paulangton"}}