{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/34398444","id":34398444,"diff_hunk":"@@ -797,6 +805,29 @@ var _ = Describe(\"Services\", func() {\n \t})\n })\n \n+// updateService fetches a service, calls the update function on it,\n+// and then attempts to send the updated service. It retries up to 2\n+// times in the face of timeouts and conflicts.\n+func updateService(c *client.Client, namespace, serviceName string, update func(*api.Service)) (*api.Service, error) {\n+\tvar service *api.Service\n+\tvar err error\n+\tfor i := 0; i < 3; i++ {","path":"test/e2e/service.go","position":91,"original_position":91,"commit_id":"aca4559bbdd4f91a7d02db50f18fe384c0975491","original_commit_id":"aca4559bbdd4f91a7d02db50f18fe384c0975491","user":{"login":"ixdy","id":8061296,"avatar_url":"https://avatars.githubusercontent.com/u/8061296?v=3","gravatar_id":"","url":"https://api.github.com/users/ixdy","html_url":"https://github.com/ixdy","followers_url":"https://api.github.com/users/ixdy/followers","following_url":"https://api.github.com/users/ixdy/following{/other_user}","gists_url":"https://api.github.com/users/ixdy/gists{/gist_id}","starred_url":"https://api.github.com/users/ixdy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ixdy/subscriptions","organizations_url":"https://api.github.com/users/ixdy/orgs","repos_url":"https://api.github.com/users/ixdy/repos","events_url":"https://api.github.com/users/ixdy/events{/privacy}","received_events_url":"https://api.github.com/users/ixdy/received_events","type":"User","site_admin":false},"body":"should there be a timeout or backoff between successive retries?","created_at":"2015-07-10T21:34:17Z","updated_at":"2015-07-10T21:34:17Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/11077#discussion_r34398444","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11077","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/34398444"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/11077#discussion_r34398444"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11077"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11077","id":39722447,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/11077","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/11077.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/11077.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11077","number":11077,"state":"open","locked":false,"title":"Adding retry logic around service updates","user":{"login":"krousey","id":157083,"avatar_url":"https://avatars.githubusercontent.com/u/157083?v=3","gravatar_id":"","url":"https://api.github.com/users/krousey","html_url":"https://github.com/krousey","followers_url":"https://api.github.com/users/krousey/followers","following_url":"https://api.github.com/users/krousey/following{/other_user}","gists_url":"https://api.github.com/users/krousey/gists{/gist_id}","starred_url":"https://api.github.com/users/krousey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krousey/subscriptions","organizations_url":"https://api.github.com/users/krousey/orgs","repos_url":"https://api.github.com/users/krousey/repos","events_url":"https://api.github.com/users/krousey/events{/privacy}","received_events_url":"https://api.github.com/users/krousey/received_events","type":"User","site_admin":false},"body":"#8892\r\n\r\nSometimes we can get a conflict when updating a service, and the e2e tests just wait in this case. This adds logic to retry up to 2 times in case of timeouts and conflicts to reduce flakes.\r\n\r\n```\r\n• Failure [115.700 seconds]\r\nServices\r\n/go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/service.go:792\r\n  should be able to change the type and nodeport settings of a service [It]\r\n  /go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/service.go:490\r\n\r\n  Expected error:\r\n      <*errors.StatusError | 0xc208bd9880>: {\r\n          ErrStatus: {\r\n              TypeMeta: {Kind: \"\", APIVersion: \"\"},\r\n              ListMeta: {SelfLink: \"\", ResourceVersion: \"\"},\r\n              Status: \"Failure\",\r\n              Message: \"service \\\"mutability-service-test\\\" cannot be updated: 101: Compare failed ([3877 != 3885]) [3887]\",\r\n              Reason: \"Conflict\",\r\n              Details: {\r\n                  Name: \"mutability-service-test\",\r\n                  Kind: \"service\",\r\n                  Causes: nil,\r\n                  RetryAfterSeconds: 0,\r\n              },\r\n              Code: 409,\r\n          },\r\n      }\r\n      service \"mutability-service-test\" cannot be updated: 101: Compare failed ([3877 != 3885]) [3887]\r\n  not to have occurred\r\n\r\n  /go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/service.go:462\r\n```","created_at":"2015-07-10T20:41:18Z","updated_at":"2015-07-10T21:34:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"432697c9aff6a92c8a510b74c0f3e89b274050ec","assignee":{"login":"ixdy","id":8061296,"avatar_url":"https://avatars.githubusercontent.com/u/8061296?v=3","gravatar_id":"","url":"https://api.github.com/users/ixdy","html_url":"https://github.com/ixdy","followers_url":"https://api.github.com/users/ixdy/followers","following_url":"https://api.github.com/users/ixdy/following{/other_user}","gists_url":"https://api.github.com/users/ixdy/gists{/gist_id}","starred_url":"https://api.github.com/users/ixdy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ixdy/subscriptions","organizations_url":"https://api.github.com/users/ixdy/orgs","repos_url":"https://api.github.com/users/ixdy/repos","events_url":"https://api.github.com/users/ixdy/events{/privacy}","received_events_url":"https://api.github.com/users/ixdy/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11077/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11077/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11077/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/aca4559bbdd4f91a7d02db50f18fe384c0975491","head":{"label":"krousey:service_flake","ref":"service_flake","sha":"aca4559bbdd4f91a7d02db50f18fe384c0975491","user":{"login":"krousey","id":157083,"avatar_url":"https://avatars.githubusercontent.com/u/157083?v=3","gravatar_id":"","url":"https://api.github.com/users/krousey","html_url":"https://github.com/krousey","followers_url":"https://api.github.com/users/krousey/followers","following_url":"https://api.github.com/users/krousey/following{/other_user}","gists_url":"https://api.github.com/users/krousey/gists{/gist_id}","starred_url":"https://api.github.com/users/krousey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krousey/subscriptions","organizations_url":"https://api.github.com/users/krousey/orgs","repos_url":"https://api.github.com/users/krousey/repos","events_url":"https://api.github.com/users/krousey/events{/privacy}","received_events_url":"https://api.github.com/users/krousey/received_events","type":"User","site_admin":false},"repo":{"id":33140890,"name":"kubernetes","full_name":"krousey/kubernetes","owner":{"login":"krousey","id":157083,"avatar_url":"https://avatars.githubusercontent.com/u/157083?v=3","gravatar_id":"","url":"https://api.github.com/users/krousey","html_url":"https://github.com/krousey","followers_url":"https://api.github.com/users/krousey/followers","following_url":"https://api.github.com/users/krousey/following{/other_user}","gists_url":"https://api.github.com/users/krousey/gists{/gist_id}","starred_url":"https://api.github.com/users/krousey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krousey/subscriptions","organizations_url":"https://api.github.com/users/krousey/orgs","repos_url":"https://api.github.com/users/krousey/repos","events_url":"https://api.github.com/users/krousey/events{/privacy}","received_events_url":"https://api.github.com/users/krousey/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/krousey/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/krousey/kubernetes","forks_url":"https://api.github.com/repos/krousey/kubernetes/forks","keys_url":"https://api.github.com/repos/krousey/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/krousey/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/krousey/kubernetes/teams","hooks_url":"https://api.github.com/repos/krousey/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/krousey/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/krousey/kubernetes/events","assignees_url":"https://api.github.com/repos/krousey/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/krousey/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/krousey/kubernetes/tags","blobs_url":"https://api.github.com/repos/krousey/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/krousey/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/krousey/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/krousey/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/krousey/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/krousey/kubernetes/languages","stargazers_url":"https://api.github.com/repos/krousey/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/krousey/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/krousey/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/krousey/kubernetes/subscription","commits_url":"https://api.github.com/repos/krousey/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/krousey/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/krousey/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/krousey/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/krousey/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/krousey/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/krousey/kubernetes/merges","archive_url":"https://api.github.com/repos/krousey/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/krousey/kubernetes/downloads","issues_url":"https://api.github.com/repos/krousey/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/krousey/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/krousey/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/krousey/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/krousey/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/krousey/kubernetes/releases{/id}","created_at":"2015-03-30T18:38:40Z","updated_at":"2015-04-20T21:05:26Z","pushed_at":"2015-07-10T20:39:00Z","git_url":"git://github.com/krousey/kubernetes.git","ssh_url":"git@github.com:krousey/kubernetes.git","clone_url":"https://github.com/krousey/kubernetes.git","svn_url":"https://github.com/krousey/kubernetes","homepage":"http://kubernetes.io","size":82425,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"8e5186a18f470dc498466cb9ec62d38ccbf1facf","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"GoogleCloudPlatform/kubernetes","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-07-10T19:32:01Z","pushed_at":"2015-07-10T21:33:33Z","git_url":"git://github.com/GoogleCloudPlatform/kubernetes.git","ssh_url":"git@github.com:GoogleCloudPlatform/kubernetes.git","clone_url":"https://github.com/GoogleCloudPlatform/kubernetes.git","svn_url":"https://github.com/GoogleCloudPlatform/kubernetes","homepage":"http://kubernetes.io","size":310889,"stargazers_count":8820,"watchers_count":8820,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1985,"mirror_url":null,"open_issues_count":1570,"forks":1985,"open_issues":1570,"watchers":8820,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11077"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/11077"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11077"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11077/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11077/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/11077/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/aca4559bbdd4f91a7d02db50f18fe384c0975491"}}}}