{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/38942","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/38942/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/38942/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/38942/events","html_url":"https://github.com/kubernetes/kubernetes/pull/38942","id":196333410,"number":38942,"title":"Refactor port allocation logic a little, deflake tests.","user":{"login":"brendandburns","id":5751682,"avatar_url":"https://avatars.githubusercontent.com/u/5751682?v=3","gravatar_id":"","url":"https://api.github.com/users/brendandburns","html_url":"https://github.com/brendandburns","followers_url":"https://api.github.com/users/brendandburns/followers","following_url":"https://api.github.com/users/brendandburns/following{/other_user}","gists_url":"https://api.github.com/users/brendandburns/gists{/gist_id}","starred_url":"https://api.github.com/users/brendandburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendandburns/subscriptions","organizations_url":"https://api.github.com/users/brendandburns/orgs","repos_url":"https://api.github.com/users/brendandburns/repos","events_url":"https://api.github.com/users/brendandburns/events{/privacy}","received_events_url":"https://api.github.com/users/brendandburns/received_events","type":"User","site_admin":false},"labels":[{"id":477397086,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":148225179,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/lgtm","name":"lgtm","color":"15dd18","default":false},{"id":349530249,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note-none","name":"release-note-none","color":"c2e0c6","default":false},{"id":253450978,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/L","name":"size/L","color":"ee9900","default":false}],"state":"closed","locked":false,"assignee":{"login":"justinsb","id":100893,"avatar_url":"https://avatars.githubusercontent.com/u/100893?v=3","gravatar_id":"","url":"https://api.github.com/users/justinsb","html_url":"https://github.com/justinsb","followers_url":"https://api.github.com/users/justinsb/followers","following_url":"https://api.github.com/users/justinsb/following{/other_user}","gists_url":"https://api.github.com/users/justinsb/gists{/gist_id}","starred_url":"https://api.github.com/users/justinsb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinsb/subscriptions","organizations_url":"https://api.github.com/users/justinsb/orgs","repos_url":"https://api.github.com/users/justinsb/repos","events_url":"https://api.github.com/users/justinsb/events{/privacy}","received_events_url":"https://api.github.com/users/justinsb/received_events","type":"User","site_admin":false},"assignees":[{"login":"justinsb","id":100893,"avatar_url":"https://avatars.githubusercontent.com/u/100893?v=3","gravatar_id":"","url":"https://api.github.com/users/justinsb","html_url":"https://github.com/justinsb","followers_url":"https://api.github.com/users/justinsb/followers","following_url":"https://api.github.com/users/justinsb/following{/other_user}","gists_url":"https://api.github.com/users/justinsb/gists{/gist_id}","starred_url":"https://api.github.com/users/justinsb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinsb/subscriptions","organizations_url":"https://api.github.com/users/justinsb/orgs","repos_url":"https://api.github.com/users/justinsb/repos","events_url":"https://api.github.com/users/justinsb/events{/privacy}","received_events_url":"https://api.github.com/users/justinsb/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2016-12-19T05:20:06Z","updated_at":"2016-12-19T17:49:47Z","closed_at":"2016-12-19T16:45:43Z","pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/38942","html_url":"https://github.com/kubernetes/kubernetes/pull/38942","diff_url":"https://github.com/kubernetes/kubernetes/pull/38942.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/38942.patch"},"body":"This should fix #38323 for real.\r\n\r\n@xiangpengzhao @rmmh @justinsb \r\n\r\nSwitch to manually cranking over the port filling logic, since there was a race between the allocate logic and the check to see if the port was freed up."},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/268030361","html_url":"https://github.com/kubernetes/kubernetes/pull/38942#issuecomment-268030361","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/38942","id":268030361,"user":{"login":"brendandburns","id":5751682,"avatar_url":"https://avatars.githubusercontent.com/u/5751682?v=3","gravatar_id":"","url":"https://api.github.com/users/brendandburns","html_url":"https://github.com/brendandburns","followers_url":"https://api.github.com/users/brendandburns/followers","following_url":"https://api.github.com/users/brendandburns/following{/other_user}","gists_url":"https://api.github.com/users/brendandburns/gists{/gist_id}","starred_url":"https://api.github.com/users/brendandburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendandburns/subscriptions","organizations_url":"https://api.github.com/users/brendandburns/orgs","repos_url":"https://api.github.com/users/brendandburns/repos","events_url":"https://api.github.com/users/brendandburns/events{/privacy}","received_events_url":"https://api.github.com/users/brendandburns/received_events","type":"User","site_admin":false},"created_at":"2016-12-19T17:49:47Z","updated_at":"2016-12-19T17:49:47Z","body":"@justinsb +1, it really smells like an abuse of goroutines.\r\n\r\nThe idea (i guess) is that you want to wait for some timeout before rejecting a request for a port, but I agree this smells.\r\n\r\nThis fix is the smallest change I could do to deflake.\r\n\r\nThe bigger refactor is to get rid of the goroutine, and then only wait on a condition if there isn't an available port.\r\n"}}
{"actor":{"display_login":"brendandburns"}}