{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/93365163","pull_request_review_id":13890426,"id":93365163,"diff_hunk":"@@ -448,13 +448,48 @@ func Test_NewGoRoutineMap_Positive_WaitWithExpBackoff(t *testing.T) {\n \t}\n }\n \n+func Test_NewGoRoutineMap_WaitForCompletionWithExpBackoff(t *testing.T) {\n+\tgrm := NewGoRoutineMap(true /* exponentialBackOffOnError */)\n+\toperationName := \"operation-err\"\n+\n+\toperation1DoneCh := make(chan interface{}, 0 /* bufferSize */)\n+\toperation1 := generateOpWithError(operation1DoneCh)\n+\terr := grm.Run(operationName, operation1)\n+\tif err != nil {\n+\t\tt.Fatalf(\"NewGoRoutine failed. Expected: <no error> Actual: <%v>\", err)\n+\t}\n+\n+\t// Act\n+\twaitDoneCh := make(chan interface{}, 1)\n+\tgo func() {\n+\t\tgrm.WaitForCompletion()\n+\t\twaitDoneCh <- true\n+\t}()\n+\n+\t// Finish the operation\n+\toperation1DoneCh <- true\n+\n+\t// Assert that WaitForCompletion returns even if scheduled op had error\n+\terr = waitChannelWithTimeout(waitDoneCh, testTimeout)\n+\tif err != nil {\n+\t\tt.Fatalf(\"Error waiting for GoRoutineMap.Wait: %v\", err)\n+\t}\n+}\n+\n func generateCallbackFunc(done chan<- interface{}) func() error {\n \treturn func() error {\n \t\tdone <- true\n \t\treturn nil\n \t}\n }\n \n+func generateOpWithError(done <-chan interface{}) func() error {","path":"pkg/util/goroutinemap/goroutinemap_test.go","position":null,"original_position":39,"commit_id":"7b423085faa2edd4cdcab44ac512f7b904e35383","original_commit_id":"a8652732a75e7ab2776632ec7a690469023da303","user":{"login":"gnufied","id":278,"avatar_url":"https://avatars.githubusercontent.com/u/278?v=3","gravatar_id":"","url":"https://api.github.com/users/gnufied","html_url":"https://github.com/gnufied","followers_url":"https://api.github.com/users/gnufied/followers","following_url":"https://api.github.com/users/gnufied/following{/other_user}","gists_url":"https://api.github.com/users/gnufied/gists{/gist_id}","starred_url":"https://api.github.com/users/gnufied/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnufied/subscriptions","organizations_url":"https://api.github.com/users/gnufied/orgs","repos_url":"https://api.github.com/users/gnufied/repos","events_url":"https://api.github.com/users/gnufied/events{/privacy}","received_events_url":"https://api.github.com/users/gnufied/received_events","type":"User","site_admin":false},"body":"ack, fixed. ","created_at":"2016-12-21T02:32:36Z","updated_at":"2016-12-21T02:32:36Z","html_url":"https://github.com/kubernetes/kubernetes/pull/38855#discussion_r93365163","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/38855","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/93365163"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/38855#discussion_r93365163"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/38855"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/38855","id":98275948,"html_url":"https://github.com/kubernetes/kubernetes/pull/38855","diff_url":"https://github.com/kubernetes/kubernetes/pull/38855.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/38855.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/38855","number":38855,"state":"open","locked":false,"title":"Fix variable shadowing in exponential backoff when deleting volumes","user":{"login":"gnufied","id":278,"avatar_url":"https://avatars.githubusercontent.com/u/278?v=3","gravatar_id":"","url":"https://api.github.com/users/gnufied","html_url":"https://github.com/gnufied","followers_url":"https://api.github.com/users/gnufied/followers","following_url":"https://api.github.com/users/gnufied/following{/other_user}","gists_url":"https://api.github.com/users/gnufied/gists{/gist_id}","starred_url":"https://api.github.com/users/gnufied/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnufied/subscriptions","organizations_url":"https://api.github.com/users/gnufied/orgs","repos_url":"https://api.github.com/users/gnufied/repos","events_url":"https://api.github.com/users/gnufied/events{/privacy}","received_events_url":"https://api.github.com/users/gnufied/received_events","type":"User","site_admin":false},"body":"While https://github.com/kubernetes/kubernetes/pull/38339 implemented exponential backoff on\r\nvolume deletion, that PR suffers from a minor bug when error thrown on volume deletion is anything other than `VolumeInUse` errors - in which case exponential backoff will not work.\r\n\r\nThis PR fixes that. This PR also makes unit tests more deterministic because exponential backoff changed the way operations are permitted.\r\n\r\nCC @jsafrane @childsb @wongma7 ","created_at":"2016-12-16T04:10:10Z","updated_at":"2016-12-21T02:32:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed37cc78c3b2106526a50d90fdb0a1bbc4cb618b","assignee":{"login":"saad-ali","id":10052848,"avatar_url":"https://avatars.githubusercontent.com/u/10052848?v=3","gravatar_id":"","url":"https://api.github.com/users/saad-ali","html_url":"https://github.com/saad-ali","followers_url":"https://api.github.com/users/saad-ali/followers","following_url":"https://api.github.com/users/saad-ali/following{/other_user}","gists_url":"https://api.github.com/users/saad-ali/gists{/gist_id}","starred_url":"https://api.github.com/users/saad-ali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saad-ali/subscriptions","organizations_url":"https://api.github.com/users/saad-ali/orgs","repos_url":"https://api.github.com/users/saad-ali/repos","events_url":"https://api.github.com/users/saad-ali/events{/privacy}","received_events_url":"https://api.github.com/users/saad-ali/received_events","type":"User","site_admin":false},"assignees":[{"login":"saad-ali","id":10052848,"avatar_url":"https://avatars.githubusercontent.com/u/10052848?v=3","gravatar_id":"","url":"https://api.github.com/users/saad-ali","html_url":"https://github.com/saad-ali","followers_url":"https://api.github.com/users/saad-ali/followers","following_url":"https://api.github.com/users/saad-ali/following{/other_user}","gists_url":"https://api.github.com/users/saad-ali/gists{/gist_id}","starred_url":"https://api.github.com/users/saad-ali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saad-ali/subscriptions","organizations_url":"https://api.github.com/users/saad-ali/orgs","repos_url":"https://api.github.com/users/saad-ali/repos","events_url":"https://api.github.com/users/saad-ali/events{/privacy}","received_events_url":"https://api.github.com/users/saad-ali/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/38855/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/38855/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/38855/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/7b423085faa2edd4cdcab44ac512f7b904e35383","head":{"label":"gnufied:fix-variable-shadow-exp-backoff","ref":"fix-variable-shadow-exp-backoff","sha":"7b423085faa2edd4cdcab44ac512f7b904e35383","user":{"login":"gnufied","id":278,"avatar_url":"https://avatars.githubusercontent.com/u/278?v=3","gravatar_id":"","url":"https://api.github.com/users/gnufied","html_url":"https://github.com/gnufied","followers_url":"https://api.github.com/users/gnufied/followers","following_url":"https://api.github.com/users/gnufied/following{/other_user}","gists_url":"https://api.github.com/users/gnufied/gists{/gist_id}","starred_url":"https://api.github.com/users/gnufied/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnufied/subscriptions","organizations_url":"https://api.github.com/users/gnufied/orgs","repos_url":"https://api.github.com/users/gnufied/repos","events_url":"https://api.github.com/users/gnufied/events{/privacy}","received_events_url":"https://api.github.com/users/gnufied/received_events","type":"User","site_admin":false},"repo":{"id":67182081,"name":"kubernetes","full_name":"gnufied/kubernetes","owner":{"login":"gnufied","id":278,"avatar_url":"https://avatars.githubusercontent.com/u/278?v=3","gravatar_id":"","url":"https://api.github.com/users/gnufied","html_url":"https://github.com/gnufied","followers_url":"https://api.github.com/users/gnufied/followers","following_url":"https://api.github.com/users/gnufied/following{/other_user}","gists_url":"https://api.github.com/users/gnufied/gists{/gist_id}","starred_url":"https://api.github.com/users/gnufied/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnufied/subscriptions","organizations_url":"https://api.github.com/users/gnufied/orgs","repos_url":"https://api.github.com/users/gnufied/repos","events_url":"https://api.github.com/users/gnufied/events{/privacy}","received_events_url":"https://api.github.com/users/gnufied/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gnufied/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":true,"url":"https://api.github.com/repos/gnufied/kubernetes","forks_url":"https://api.github.com/repos/gnufied/kubernetes/forks","keys_url":"https://api.github.com/repos/gnufied/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gnufied/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gnufied/kubernetes/teams","hooks_url":"https://api.github.com/repos/gnufied/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/gnufied/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/gnufied/kubernetes/events","assignees_url":"https://api.github.com/repos/gnufied/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/gnufied/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/gnufied/kubernetes/tags","blobs_url":"https://api.github.com/repos/gnufied/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gnufied/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gnufied/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/gnufied/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gnufied/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/gnufied/kubernetes/languages","stargazers_url":"https://api.github.com/repos/gnufied/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/gnufied/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/gnufied/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/gnufied/kubernetes/subscription","commits_url":"https://api.github.com/repos/gnufied/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/gnufied/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/gnufied/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/gnufied/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/gnufied/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/gnufied/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gnufied/kubernetes/merges","archive_url":"https://api.github.com/repos/gnufied/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gnufied/kubernetes/downloads","issues_url":"https://api.github.com/repos/gnufied/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/gnufied/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/gnufied/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/gnufied/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gnufied/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/gnufied/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/gnufied/kubernetes/deployments","created_at":"2016-09-02T02:13:21Z","updated_at":"2016-09-02T02:13:54Z","pushed_at":"2016-12-21T02:31:25Z","git_url":"git://github.com/gnufied/kubernetes.git","ssh_url":"git@github.com:gnufied/kubernetes.git","clone_url":"https://github.com/gnufied/kubernetes.git","svn_url":"https://github.com/gnufied/kubernetes","homepage":"http://kubernetes.io","size":373286,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"kubernetes:master","ref":"master","sha":"e150a6e3831cc7c05592d21aae2f9ef21ae388f3","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","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":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","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/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2016-12-21T02:26:15Z","pushed_at":"2016-12-21T02:32:35Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":478750,"stargazers_count":19377,"watchers_count":19377,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6482,"mirror_url":null,"open_issues_count":5436,"forks":6482,"open_issues":5436,"watchers":19377,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/38855"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/38855"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/38855"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/38855/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/38855/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/38855/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/7b423085faa2edd4cdcab44ac512f7b904e35383"}}}}
{"actor":{"display_login":"gnufied"}}