{"action":"created","comment":{"url":"https://api.github.com/repos/deis/builder/pulls/comments/60959976","id":60959976,"diff_hunk":"@@ -82,8 +82,12 @@ func main() {\n \t\t\t\tlog.Printf(\"Starting health check server on port %d\", cnf.HealthSrvPort)\n \t\t\t\thealthSrvCh := make(chan error)\n \t\t\t\tgo func() {\n-\t\t\t\t\tif err := healthsrv.Start(cnf.HealthSrvPort, kubeClient.Namespaces(), storageDriver, circ); err != nil {\n-\t\t\t\t\t\thealthSrvCh <- err\n+\t\t\t\t\tfor{\n+\t\t\t\t\t\tif err := healthsrv.Start(cnf.HealthSrvPort, kubeClient.Namespaces(), storageDriver, circ); err != nil {\n+\t\t\t\t\t\t\thealthSrvCh <- err\n+\t\t\t\t\t\t\tbreak\n+\t\t\t\t\t\t}\n+\t\t\t\t\t\tlog.Print(\"namespace watcher channel closed.Starting the watch again\")","path":"boot.go","position":11,"original_position":11,"commit_id":"0665d21667931365c287238c9b2cb794b7cb2fe5","original_commit_id":"31ddd93aa420c846f47c4ebfcb1c266599414383","user":{"login":"kmala","id":12552530,"avatar_url":"https://avatars.githubusercontent.com/u/12552530?v=3","gravatar_id":"","url":"https://api.github.com/users/kmala","html_url":"https://github.com/kmala","followers_url":"https://api.github.com/users/kmala/followers","following_url":"https://api.github.com/users/kmala/following{/other_user}","gists_url":"https://api.github.com/users/kmala/gists{/gist_id}","starred_url":"https://api.github.com/users/kmala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmala/subscriptions","organizations_url":"https://api.github.com/users/kmala/orgs","repos_url":"https://api.github.com/users/kmala/repos","events_url":"https://api.github.com/users/kmala/events{/privacy}","received_events_url":"https://api.github.com/users/kmala/received_events","type":"User","site_admin":false},"body":"since we are getting the connection again and starting cleaning of the apps i don't think it would disturb build flow as only when the disk space fills does it have a problem.\r\nWhat if the connections regularly closes which means we would be restarting the pod regularly and  i think the pod should be restarted only when it is absolute necessity that only a restart will help it.","created_at":"2016-04-25T18:09:57Z","updated_at":"2016-04-25T18:09:57Z","html_url":"https://github.com/deis/builder/pull/308#discussion_r60959976","pull_request_url":"https://api.github.com/repos/deis/builder/pulls/308","_links":{"self":{"href":"https://api.github.com/repos/deis/builder/pulls/comments/60959976"},"html":{"href":"https://github.com/deis/builder/pull/308#discussion_r60959976"},"pull_request":{"href":"https://api.github.com/repos/deis/builder/pulls/308"}}},"pull_request":{"url":"https://api.github.com/repos/deis/builder/pulls/308","id":67750761,"html_url":"https://github.com/deis/builder/pull/308","diff_url":"https://github.com/deis/builder/pull/308.diff","patch_url":"https://github.com/deis/builder/pull/308.patch","issue_url":"https://api.github.com/repos/deis/builder/issues/308","number":308,"state":"open","locked":false,"title":"fix(cleaner): handle the channel close gracefully","user":{"login":"kmala","id":12552530,"avatar_url":"https://avatars.githubusercontent.com/u/12552530?v=3","gravatar_id":"","url":"https://api.github.com/users/kmala","html_url":"https://github.com/kmala","followers_url":"https://api.github.com/users/kmala/followers","following_url":"https://api.github.com/users/kmala/following{/other_user}","gists_url":"https://api.github.com/users/kmala/gists{/gist_id}","starred_url":"https://api.github.com/users/kmala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmala/subscriptions","organizations_url":"https://api.github.com/users/kmala/orgs","repos_url":"https://api.github.com/users/kmala/repos","events_url":"https://api.github.com/users/kmala/events{/privacy}","received_events_url":"https://api.github.com/users/kmala/received_events","type":"User","site_admin":false},"body":"# Summary of Changes\r\n\r\nwhen the channel is closed the break just comes out of the select statement and not the for loop which is causing it to be an empty for loop and hence the raise in the CPU usage.\r\n\r\n# Issue(s) that this PR Closes\r\nCloses #287\r\n# Associated [End To End Test](https://github.com/deis/workflow-e2e) PR(s)\r\n\r\n\r\n# Associated [Documentation](https://github.com/deis/workflow) PR(s)\r\n\r\n# Associated [Design Document](http://docs.deis.io/en/latest/contributing/design-documents)(s)\r\n\r\n# Testing Instructions\r\n\r\nPlease provide a detailed list for how to test the changes in this PR.\r\n\r\n1. Create a Deis Cluster\r\n2. Register an app to test builder is working\r\n3. Now wait for ~1 hr so that the channel is closed which can be confirmed by seeing the builder logs.\r\n4. You should not see any spike in the cpu usage.\r\n\r\n# Pull Request Hygiene TODOs\r\n\r\nPlease make sure the below checklist is complete.\r\n\r\n- [x] Your pull request is concise and to the point (make another PR for refactoring nearby code)\r\n- [x] Your commits are squashed into logical units of work\r\n- [x] Your commits follow the [commit style guidelines](http://docs.deis.io/en/latest/contributing/standards/#commit-style-guide)\r\n\r\n","created_at":"2016-04-25T16:40:23Z","updated_at":"2016-04-25T18:09:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"31dc596dd6087b37f9513a44a34b03c290c5fe55","assignee":{"login":"kmala","id":12552530,"avatar_url":"https://avatars.githubusercontent.com/u/12552530?v=3","gravatar_id":"","url":"https://api.github.com/users/kmala","html_url":"https://github.com/kmala","followers_url":"https://api.github.com/users/kmala/followers","following_url":"https://api.github.com/users/kmala/following{/other_user}","gists_url":"https://api.github.com/users/kmala/gists{/gist_id}","starred_url":"https://api.github.com/users/kmala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmala/subscriptions","organizations_url":"https://api.github.com/users/kmala/orgs","repos_url":"https://api.github.com/users/kmala/repos","events_url":"https://api.github.com/users/kmala/events{/privacy}","received_events_url":"https://api.github.com/users/kmala/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/deis/builder/milestones/6","html_url":"https://github.com/deis/builder/milestones/v2.0-beta3","labels_url":"https://api.github.com/repos/deis/builder/milestones/6/labels","id":1682296,"number":6,"title":"v2.0-beta3","description":null,"creator":{"login":"slack","id":28873,"avatar_url":"https://avatars.githubusercontent.com/u/28873?v=3","gravatar_id":"","url":"https://api.github.com/users/slack","html_url":"https://github.com/slack","followers_url":"https://api.github.com/users/slack/followers","following_url":"https://api.github.com/users/slack/following{/other_user}","gists_url":"https://api.github.com/users/slack/gists{/gist_id}","starred_url":"https://api.github.com/users/slack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slack/subscriptions","organizations_url":"https://api.github.com/users/slack/orgs","repos_url":"https://api.github.com/users/slack/repos","events_url":"https://api.github.com/users/slack/events{/privacy}","received_events_url":"https://api.github.com/users/slack/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":10,"state":"open","created_at":"2016-04-04T15:54:10Z","updated_at":"2016-04-25T16:40:38Z","due_on":"2016-04-27T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/deis/builder/pulls/308/commits","review_comments_url":"https://api.github.com/repos/deis/builder/pulls/308/comments","review_comment_url":"https://api.github.com/repos/deis/builder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/deis/builder/issues/308/comments","statuses_url":"https://api.github.com/repos/deis/builder/statuses/0665d21667931365c287238c9b2cb794b7cb2fe5","head":{"label":"kmala:race","ref":"race","sha":"0665d21667931365c287238c9b2cb794b7cb2fe5","user":{"login":"kmala","id":12552530,"avatar_url":"https://avatars.githubusercontent.com/u/12552530?v=3","gravatar_id":"","url":"https://api.github.com/users/kmala","html_url":"https://github.com/kmala","followers_url":"https://api.github.com/users/kmala/followers","following_url":"https://api.github.com/users/kmala/following{/other_user}","gists_url":"https://api.github.com/users/kmala/gists{/gist_id}","starred_url":"https://api.github.com/users/kmala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmala/subscriptions","organizations_url":"https://api.github.com/users/kmala/orgs","repos_url":"https://api.github.com/users/kmala/repos","events_url":"https://api.github.com/users/kmala/events{/privacy}","received_events_url":"https://api.github.com/users/kmala/received_events","type":"User","site_admin":false},"repo":{"id":51550966,"name":"builder","full_name":"kmala/builder","owner":{"login":"kmala","id":12552530,"avatar_url":"https://avatars.githubusercontent.com/u/12552530?v=3","gravatar_id":"","url":"https://api.github.com/users/kmala","html_url":"https://github.com/kmala","followers_url":"https://api.github.com/users/kmala/followers","following_url":"https://api.github.com/users/kmala/following{/other_user}","gists_url":"https://api.github.com/users/kmala/gists{/gist_id}","starred_url":"https://api.github.com/users/kmala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmala/subscriptions","organizations_url":"https://api.github.com/users/kmala/orgs","repos_url":"https://api.github.com/users/kmala/repos","events_url":"https://api.github.com/users/kmala/events{/privacy}","received_events_url":"https://api.github.com/users/kmala/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kmala/builder","description":"Heroku buildpack builder for Deis v2","fork":true,"url":"https://api.github.com/repos/kmala/builder","forks_url":"https://api.github.com/repos/kmala/builder/forks","keys_url":"https://api.github.com/repos/kmala/builder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kmala/builder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kmala/builder/teams","hooks_url":"https://api.github.com/repos/kmala/builder/hooks","issue_events_url":"https://api.github.com/repos/kmala/builder/issues/events{/number}","events_url":"https://api.github.com/repos/kmala/builder/events","assignees_url":"https://api.github.com/repos/kmala/builder/assignees{/user}","branches_url":"https://api.github.com/repos/kmala/builder/branches{/branch}","tags_url":"https://api.github.com/repos/kmala/builder/tags","blobs_url":"https://api.github.com/repos/kmala/builder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kmala/builder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kmala/builder/git/refs{/sha}","trees_url":"https://api.github.com/repos/kmala/builder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kmala/builder/statuses/{sha}","languages_url":"https://api.github.com/repos/kmala/builder/languages","stargazers_url":"https://api.github.com/repos/kmala/builder/stargazers","contributors_url":"https://api.github.com/repos/kmala/builder/contributors","subscribers_url":"https://api.github.com/repos/kmala/builder/subscribers","subscription_url":"https://api.github.com/repos/kmala/builder/subscription","commits_url":"https://api.github.com/repos/kmala/builder/commits{/sha}","git_commits_url":"https://api.github.com/repos/kmala/builder/git/commits{/sha}","comments_url":"https://api.github.com/repos/kmala/builder/comments{/number}","issue_comment_url":"https://api.github.com/repos/kmala/builder/issues/comments{/number}","contents_url":"https://api.github.com/repos/kmala/builder/contents/{+path}","compare_url":"https://api.github.com/repos/kmala/builder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kmala/builder/merges","archive_url":"https://api.github.com/repos/kmala/builder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kmala/builder/downloads","issues_url":"https://api.github.com/repos/kmala/builder/issues{/number}","pulls_url":"https://api.github.com/repos/kmala/builder/pulls{/number}","milestones_url":"https://api.github.com/repos/kmala/builder/milestones{/number}","notifications_url":"https://api.github.com/repos/kmala/builder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kmala/builder/labels{/name}","releases_url":"https://api.github.com/repos/kmala/builder/releases{/id}","deployments_url":"https://api.github.com/repos/kmala/builder/deployments","created_at":"2016-02-11T22:12:27Z","updated_at":"2016-02-11T22:12:28Z","pushed_at":"2016-04-25T17:24:23Z","git_url":"git://github.com/kmala/builder.git","ssh_url":"git@github.com:kmala/builder.git","clone_url":"https://github.com/kmala/builder.git","svn_url":"https://github.com/kmala/builder","homepage":"http://deis.io","size":49133,"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":"deis:master","ref":"master","sha":"514d0e3f604de5ddb2450d0b7a5b5729325573e8","user":{"login":"deis","id":6117407,"avatar_url":"https://avatars.githubusercontent.com/u/6117407?v=3","gravatar_id":"","url":"https://api.github.com/users/deis","html_url":"https://github.com/deis","followers_url":"https://api.github.com/users/deis/followers","following_url":"https://api.github.com/users/deis/following{/other_user}","gists_url":"https://api.github.com/users/deis/gists{/gist_id}","starred_url":"https://api.github.com/users/deis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deis/subscriptions","organizations_url":"https://api.github.com/users/deis/orgs","repos_url":"https://api.github.com/users/deis/repos","events_url":"https://api.github.com/users/deis/events{/privacy}","received_events_url":"https://api.github.com/users/deis/received_events","type":"Organization","site_admin":false},"repo":{"id":44639329,"name":"builder","full_name":"deis/builder","owner":{"login":"deis","id":6117407,"avatar_url":"https://avatars.githubusercontent.com/u/6117407?v=3","gravatar_id":"","url":"https://api.github.com/users/deis","html_url":"https://github.com/deis","followers_url":"https://api.github.com/users/deis/followers","following_url":"https://api.github.com/users/deis/following{/other_user}","gists_url":"https://api.github.com/users/deis/gists{/gist_id}","starred_url":"https://api.github.com/users/deis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deis/subscriptions","organizations_url":"https://api.github.com/users/deis/orgs","repos_url":"https://api.github.com/users/deis/repos","events_url":"https://api.github.com/users/deis/events{/privacy}","received_events_url":"https://api.github.com/users/deis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/deis/builder","description":"Git server and application builder for Deis Workflow","fork":false,"url":"https://api.github.com/repos/deis/builder","forks_url":"https://api.github.com/repos/deis/builder/forks","keys_url":"https://api.github.com/repos/deis/builder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deis/builder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deis/builder/teams","hooks_url":"https://api.github.com/repos/deis/builder/hooks","issue_events_url":"https://api.github.com/repos/deis/builder/issues/events{/number}","events_url":"https://api.github.com/repos/deis/builder/events","assignees_url":"https://api.github.com/repos/deis/builder/assignees{/user}","branches_url":"https://api.github.com/repos/deis/builder/branches{/branch}","tags_url":"https://api.github.com/repos/deis/builder/tags","blobs_url":"https://api.github.com/repos/deis/builder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deis/builder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deis/builder/git/refs{/sha}","trees_url":"https://api.github.com/repos/deis/builder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deis/builder/statuses/{sha}","languages_url":"https://api.github.com/repos/deis/builder/languages","stargazers_url":"https://api.github.com/repos/deis/builder/stargazers","contributors_url":"https://api.github.com/repos/deis/builder/contributors","subscribers_url":"https://api.github.com/repos/deis/builder/subscribers","subscription_url":"https://api.github.com/repos/deis/builder/subscription","commits_url":"https://api.github.com/repos/deis/builder/commits{/sha}","git_commits_url":"https://api.github.com/repos/deis/builder/git/commits{/sha}","comments_url":"https://api.github.com/repos/deis/builder/comments{/number}","issue_comment_url":"https://api.github.com/repos/deis/builder/issues/comments{/number}","contents_url":"https://api.github.com/repos/deis/builder/contents/{+path}","compare_url":"https://api.github.com/repos/deis/builder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deis/builder/merges","archive_url":"https://api.github.com/repos/deis/builder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deis/builder/downloads","issues_url":"https://api.github.com/repos/deis/builder/issues{/number}","pulls_url":"https://api.github.com/repos/deis/builder/pulls{/number}","milestones_url":"https://api.github.com/repos/deis/builder/milestones{/number}","notifications_url":"https://api.github.com/repos/deis/builder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deis/builder/labels{/name}","releases_url":"https://api.github.com/repos/deis/builder/releases{/id}","deployments_url":"https://api.github.com/repos/deis/builder/deployments","created_at":"2015-10-20T22:49:18Z","updated_at":"2016-04-17T20:30:12Z","pushed_at":"2016-04-25T17:34:52Z","git_url":"git://github.com/deis/builder.git","ssh_url":"git@github.com:deis/builder.git","clone_url":"https://github.com/deis/builder.git","svn_url":"https://github.com/deis/builder","homepage":"https://deis.com","size":52789,"stargazers_count":18,"watchers_count":18,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":59,"forks":18,"open_issues":59,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/deis/builder/pulls/308"},"html":{"href":"https://github.com/deis/builder/pull/308"},"issue":{"href":"https://api.github.com/repos/deis/builder/issues/308"},"comments":{"href":"https://api.github.com/repos/deis/builder/issues/308/comments"},"review_comments":{"href":"https://api.github.com/repos/deis/builder/pulls/308/comments"},"review_comment":{"href":"https://api.github.com/repos/deis/builder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/deis/builder/pulls/308/commits"},"statuses":{"href":"https://api.github.com/repos/deis/builder/statuses/0665d21667931365c287238c9b2cb794b7cb2fe5"}}}}