{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/144779857","pull_request_review_id":69482698,"id":144779857,"diff_hunk":"@@ -112,6 +113,11 @@ func WithExponentialBackoff(initialBackoff time.Duration, webhookFn func() error\n \t\tif _, shouldRetry := apierrors.SuggestsClientDelay(err); shouldRetry {\n \t\t\treturn false, nil\n \t\t}\n+\t\t// \"Connection reset by peer\" is usually a transient error, but it's not\n+\t\t// retried by the rest client because the request is not GET.\n+\t\tif net.IsConnectionReset(err) {","path":"staging/src/k8s.io/apiserver/pkg/util/webhook/webhook.go","position":14,"original_position":14,"commit_id":"40161eddde218e5febf8a5625ba4c16600b4d4d3","original_commit_id":"40161eddde218e5febf8a5625ba4c16600b4d4d3","user":{"login":"sttts","id":730123,"avatar_url":"https://avatars0.githubusercontent.com/u/730123?v=4","gravatar_id":"","url":"https://api.github.com/users/sttts","html_url":"https://github.com/sttts","followers_url":"https://api.github.com/users/sttts/followers","following_url":"https://api.github.com/users/sttts/following{/other_user}","gists_url":"https://api.github.com/users/sttts/gists{/gist_id}","starred_url":"https://api.github.com/users/sttts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sttts/subscriptions","organizations_url":"https://api.github.com/users/sttts/orgs","repos_url":"https://api.github.com/users/sttts/repos","events_url":"https://api.github.com/users/sttts/events{/privacy}","received_events_url":"https://api.github.com/users/sttts/received_events","type":"User","site_admin":false},"body":"I would move IsConnectionReset and also IsInternalError up. Both are unconditional, as the others. Then for all other errors we call `SuggestsClientDelay`. Now in the current shape it looks like the order of the tests matter. But it doesn't.","created_at":"2017-10-16T08:15:04Z","updated_at":"2017-10-16T08:15:05Z","html_url":"https://github.com/kubernetes/kubernetes/pull/53947#discussion_r144779857","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/53947","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/144779857"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/53947#discussion_r144779857"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/53947"}},"in_reply_to_id":144778082},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/53947","id":146653383,"html_url":"https://github.com/kubernetes/kubernetes/pull/53947","diff_url":"https://github.com/kubernetes/kubernetes/pull/53947.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/53947.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/53947","number":53947,"state":"open","locked":false,"title":"Always retry connection reset error in webhook","user":{"login":"crassirostris","id":1756505,"avatar_url":"https://avatars1.githubusercontent.com/u/1756505?v=4","gravatar_id":"","url":"https://api.github.com/users/crassirostris","html_url":"https://github.com/crassirostris","followers_url":"https://api.github.com/users/crassirostris/followers","following_url":"https://api.github.com/users/crassirostris/following{/other_user}","gists_url":"https://api.github.com/users/crassirostris/gists{/gist_id}","starred_url":"https://api.github.com/users/crassirostris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crassirostris/subscriptions","organizations_url":"https://api.github.com/users/crassirostris/orgs","repos_url":"https://api.github.com/users/crassirostris/repos","events_url":"https://api.github.com/users/crassirostris/events{/privacy}","received_events_url":"https://api.github.com/users/crassirostris/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/kubernetes/kubernetes/issues/52909\r\n\r\nAudit logging uses webhook to send events to the backend and currently even a little blip in networking can cause several hundreds of events to be lost. This PR adds an additional check, that is similar to [the one in the rest package](https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/client-go/rest/request.go#L657), but ignores the fact that the request is not GET and always retries \"Connection reset by peers\" error.\r\n\r\n```release-note\r\nWebhook always retries connection reset error.\r\n```","created_at":"2017-10-15T14:58:35Z","updated_at":"2017-10-16T08:15:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bf7d7a625a4e4b62357e08e550c194ae0b3bea7e","assignee":{"login":"sttts","id":730123,"avatar_url":"https://avatars0.githubusercontent.com/u/730123?v=4","gravatar_id":"","url":"https://api.github.com/users/sttts","html_url":"https://github.com/sttts","followers_url":"https://api.github.com/users/sttts/followers","following_url":"https://api.github.com/users/sttts/following{/other_user}","gists_url":"https://api.github.com/users/sttts/gists{/gist_id}","starred_url":"https://api.github.com/users/sttts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sttts/subscriptions","organizations_url":"https://api.github.com/users/sttts/orgs","repos_url":"https://api.github.com/users/sttts/repos","events_url":"https://api.github.com/users/sttts/events{/privacy}","received_events_url":"https://api.github.com/users/sttts/received_events","type":"User","site_admin":false},"assignees":[{"login":"sttts","id":730123,"avatar_url":"https://avatars0.githubusercontent.com/u/730123?v=4","gravatar_id":"","url":"https://api.github.com/users/sttts","html_url":"https://github.com/sttts","followers_url":"https://api.github.com/users/sttts/followers","following_url":"https://api.github.com/users/sttts/following{/other_user}","gists_url":"https://api.github.com/users/sttts/gists{/gist_id}","starred_url":"https://api.github.com/users/sttts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sttts/subscriptions","organizations_url":"https://api.github.com/users/sttts/orgs","repos_url":"https://api.github.com/users/sttts/repos","events_url":"https://api.github.com/users/sttts/events{/privacy}","received_events_url":"https://api.github.com/users/sttts/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/35","html_url":"https://github.com/kubernetes/kubernetes/milestone/35","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/35/labels","id":2422217,"number":35,"title":"v1.9","description":null,"creator":{"login":"mtaufen","id":903617,"avatar_url":"https://avatars1.githubusercontent.com/u/903617?v=4","gravatar_id":"","url":"https://api.github.com/users/mtaufen","html_url":"https://github.com/mtaufen","followers_url":"https://api.github.com/users/mtaufen/followers","following_url":"https://api.github.com/users/mtaufen/following{/other_user}","gists_url":"https://api.github.com/users/mtaufen/gists{/gist_id}","starred_url":"https://api.github.com/users/mtaufen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtaufen/subscriptions","organizations_url":"https://api.github.com/users/mtaufen/orgs","repos_url":"https://api.github.com/users/mtaufen/repos","events_url":"https://api.github.com/users/mtaufen/events{/privacy}","received_events_url":"https://api.github.com/users/mtaufen/received_events","type":"User","site_admin":false},"open_issues":64,"closed_issues":50,"state":"open","created_at":"2017-03-30T14:12:39Z","updated_at":"2017-10-16T07:20:25Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/53947/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/53947/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/53947/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/40161eddde218e5febf8a5625ba4c16600b4d4d3","head":{"label":"crassirostris:retry-webhook-net-errors","ref":"retry-webhook-net-errors","sha":"40161eddde218e5febf8a5625ba4c16600b4d4d3","user":{"login":"crassirostris","id":1756505,"avatar_url":"https://avatars1.githubusercontent.com/u/1756505?v=4","gravatar_id":"","url":"https://api.github.com/users/crassirostris","html_url":"https://github.com/crassirostris","followers_url":"https://api.github.com/users/crassirostris/followers","following_url":"https://api.github.com/users/crassirostris/following{/other_user}","gists_url":"https://api.github.com/users/crassirostris/gists{/gist_id}","starred_url":"https://api.github.com/users/crassirostris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crassirostris/subscriptions","organizations_url":"https://api.github.com/users/crassirostris/orgs","repos_url":"https://api.github.com/users/crassirostris/repos","events_url":"https://api.github.com/users/crassirostris/events{/privacy}","received_events_url":"https://api.github.com/users/crassirostris/received_events","type":"User","site_admin":false},"repo":{"id":68590036,"name":"kubernetes","full_name":"crassirostris/kubernetes","owner":{"login":"crassirostris","id":1756505,"avatar_url":"https://avatars1.githubusercontent.com/u/1756505?v=4","gravatar_id":"","url":"https://api.github.com/users/crassirostris","html_url":"https://github.com/crassirostris","followers_url":"https://api.github.com/users/crassirostris/followers","following_url":"https://api.github.com/users/crassirostris/following{/other_user}","gists_url":"https://api.github.com/users/crassirostris/gists{/gist_id}","starred_url":"https://api.github.com/users/crassirostris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crassirostris/subscriptions","organizations_url":"https://api.github.com/users/crassirostris/orgs","repos_url":"https://api.github.com/users/crassirostris/repos","events_url":"https://api.github.com/users/crassirostris/events{/privacy}","received_events_url":"https://api.github.com/users/crassirostris/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/crassirostris/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":true,"url":"https://api.github.com/repos/crassirostris/kubernetes","forks_url":"https://api.github.com/repos/crassirostris/kubernetes/forks","keys_url":"https://api.github.com/repos/crassirostris/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crassirostris/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crassirostris/kubernetes/teams","hooks_url":"https://api.github.com/repos/crassirostris/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/crassirostris/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/crassirostris/kubernetes/events","assignees_url":"https://api.github.com/repos/crassirostris/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/crassirostris/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/crassirostris/kubernetes/tags","blobs_url":"https://api.github.com/repos/crassirostris/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crassirostris/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crassirostris/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/crassirostris/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crassirostris/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/crassirostris/kubernetes/languages","stargazers_url":"https://api.github.com/repos/crassirostris/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/crassirostris/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/crassirostris/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/crassirostris/kubernetes/subscription","commits_url":"https://api.github.com/repos/crassirostris/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/crassirostris/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/crassirostris/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/crassirostris/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/crassirostris/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/crassirostris/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crassirostris/kubernetes/merges","archive_url":"https://api.github.com/repos/crassirostris/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crassirostris/kubernetes/downloads","issues_url":"https://api.github.com/repos/crassirostris/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/crassirostris/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/crassirostris/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/crassirostris/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crassirostris/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/crassirostris/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/crassirostris/kubernetes/deployments","created_at":"2016-09-19T09:23:31Z","updated_at":"2016-09-19T09:24:05Z","pushed_at":"2017-10-15T14:59:28Z","git_url":"git://github.com/crassirostris/kubernetes.git","ssh_url":"git@github.com:crassirostris/kubernetes.git","clone_url":"https://github.com/crassirostris/kubernetes.git","svn_url":"https://github.com/crassirostris/kubernetes","homepage":"http://kubernetes.io","size":504121,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"4ad4e1ec40bc64ff4e31412b3828c10fb4396826","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":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","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/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":"2017-10-16T07:55:58Z","pushed_at":"2017-10-16T07:38:15Z","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":722020,"stargazers_count":27699,"watchers_count":27699,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9928,"mirror_url":null,"open_issues_count":5512,"forks":9928,"open_issues":5512,"watchers":27699,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/53947"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/53947"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/53947"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/53947/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/53947/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/53947/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/40161eddde218e5febf8a5625ba4c16600b4d4d3"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"sttts"}}