{"action":"created","comment":{"url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/comments/58103040","id":58103040,"diff_hunk":"@@ -184,13 +184,83 @@ class AzureNetworkClient extends AzureBaseClient {\n     def loadBalancer = client.getLoadBalancersOperations().get(resourceGroupName, loadBalancerName, null).body\n \n     if (loadBalancer.frontendIPConfigurations.size() != 1) {\n-      throw new RuntimeException(\"Unexpected number of public IP addresses associated with the load balancer (should be only one)!\")\n+      throw new RuntimeException(\"Unexpected number of public IP addresses associated with the load balancer (should always be only one)!\")\n     }\n \n     def publicIpAddressName = AzureUtilities.getResourceNameFromID(loadBalancer.frontendIPConfigurations.first().getPublicIPAddress().id)\n-    client.getLoadBalancersOperations().delete(resourceGroupName, loadBalancerName)\n \n-    client.getPublicIPAddressesOperations().delete(resourceGroupName, publicIpAddressName)\n+    ServiceResponse<Void> result = null\n+    // The API call might return a timeout exception or some other Azure CloudException that is not\n+    //   related to the operation we are trying to execute; retry couple of times and if the final\n+    //   retry fails then rethrow\n+    long operationRetry = 0\n+    while (operationRetry < AZURE_ATOMICOPERATION_RETRY) {","path":"clouddriver-azure/src/main/groovy/com/netflix/spinnaker/clouddriver/azure/client/AzureNetworkClient.groovy","position":17,"original_position":17,"commit_id":"7ef7c27d2496812bba457bb00b6fd330709e42e4","original_commit_id":"7ef7c27d2496812bba457bb00b6fd330709e42e4","user":{"login":"milismsft","id":15163996,"avatar_url":"https://avatars.githubusercontent.com/u/15163996?v=3","gravatar_id":"","url":"https://api.github.com/users/milismsft","html_url":"https://github.com/milismsft","followers_url":"https://api.github.com/users/milismsft/followers","following_url":"https://api.github.com/users/milismsft/following{/other_user}","gists_url":"https://api.github.com/users/milismsft/gists{/gist_id}","starred_url":"https://api.github.com/users/milismsft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milismsft/subscriptions","organizations_url":"https://api.github.com/users/milismsft/orgs","repos_url":"https://api.github.com/users/milismsft/repos","events_url":"https://api.github.com/users/milismsft/events{/privacy}","received_events_url":"https://api.github.com/users/milismsft/received_events","type":"User","site_admin":false},"body":"I've made a note to refactor these into one single method; I've initially started with something much simpler than added the extra lines.","created_at":"2016-03-31T18:23:44Z","updated_at":"2016-03-31T18:23:44Z","html_url":"https://github.com/spinnaker/clouddriver/pull/489#discussion_r58103040","pull_request_url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/489","_links":{"self":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/comments/58103040"},"html":{"href":"https://github.com/spinnaker/clouddriver/pull/489#discussion_r58103040"},"pull_request":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/489"}}},"pull_request":{"url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/489","id":64677413,"html_url":"https://github.com/spinnaker/clouddriver/pull/489","diff_url":"https://github.com/spinnaker/clouddriver/pull/489.diff","patch_url":"https://github.com/spinnaker/clouddriver/pull/489.patch","issue_url":"https://api.github.com/repos/spinnaker/clouddriver/issues/489","number":489,"state":"open","locked":false,"title":"Add destroy server group ops and other minor bug fixes","user":{"login":"milismsft","id":15163996,"avatar_url":"https://avatars.githubusercontent.com/u/15163996?v=3","gravatar_id":"","url":"https://api.github.com/users/milismsft","html_url":"https://github.com/milismsft","followers_url":"https://api.github.com/users/milismsft/followers","following_url":"https://api.github.com/users/milismsft/following{/other_user}","gists_url":"https://api.github.com/users/milismsft/gists{/gist_id}","starred_url":"https://api.github.com/users/milismsft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milismsft/subscriptions","organizations_url":"https://api.github.com/users/milismsft/orgs","repos_url":"https://api.github.com/users/milismsft/repos","events_url":"https://api.github.com/users/milismsft/events{/privacy}","received_events_url":"https://api.github.com/users/milismsft/received_events","type":"User","site_admin":false},"body":"Add destroy server group ops. \r\nCleanup resources that are created as part of the create server group in case of a failure during the creation.\r\nAdd retries support when deleting a resource in Azure (work around for random timeouts when accessing Azure resources in the Azure Cloud).\r\nFix an exception in clouddriver console when the application has no clusters.\r\nAdd type as part of the deployment name. \r\n","created_at":"2016-03-30T18:48:52Z","updated_at":"2016-03-31T18:23:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"01f7884cb74278f6c1273cbeee8a32dd01d5f09a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/489/commits","review_comments_url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/489/comments","review_comment_url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spinnaker/clouddriver/issues/489/comments","statuses_url":"https://api.github.com/repos/spinnaker/clouddriver/statuses/7ef7c27d2496812bba457bb00b6fd330709e42e4","head":{"label":"Microsoft:azure-destroysg-pr","ref":"azure-destroysg-pr","sha":"7ef7c27d2496812bba457bb00b6fd330709e42e4","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":46595977,"name":"clouddriver","full_name":"Microsoft/clouddriver","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/clouddriver","description":"read and write operations across cloud providers","fork":true,"url":"https://api.github.com/repos/Microsoft/clouddriver","forks_url":"https://api.github.com/repos/Microsoft/clouddriver/forks","keys_url":"https://api.github.com/repos/Microsoft/clouddriver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/clouddriver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/clouddriver/teams","hooks_url":"https://api.github.com/repos/Microsoft/clouddriver/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/clouddriver/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/clouddriver/events","assignees_url":"https://api.github.com/repos/Microsoft/clouddriver/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/clouddriver/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/clouddriver/tags","blobs_url":"https://api.github.com/repos/Microsoft/clouddriver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/clouddriver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/clouddriver/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/clouddriver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/clouddriver/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/clouddriver/languages","stargazers_url":"https://api.github.com/repos/Microsoft/clouddriver/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/clouddriver/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/clouddriver/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/clouddriver/subscription","commits_url":"https://api.github.com/repos/Microsoft/clouddriver/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/clouddriver/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/clouddriver/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/clouddriver/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/clouddriver/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/clouddriver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/clouddriver/merges","archive_url":"https://api.github.com/repos/Microsoft/clouddriver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/clouddriver/downloads","issues_url":"https://api.github.com/repos/Microsoft/clouddriver/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/clouddriver/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/clouddriver/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/clouddriver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/clouddriver/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/clouddriver/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/clouddriver/deployments","created_at":"2015-11-21T01:25:04Z","updated_at":"2016-03-21T05:10:00Z","pushed_at":"2016-03-31T17:04:17Z","git_url":"git://github.com/Microsoft/clouddriver.git","ssh_url":"git@github.com:Microsoft/clouddriver.git","clone_url":"https://github.com/Microsoft/clouddriver.git","svn_url":"https://github.com/Microsoft/clouddriver","homepage":null,"size":25736,"stargazers_count":9,"watchers_count":9,"language":"Groovy","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":9,"default_branch":"master"}},"base":{"label":"spinnaker:master","ref":"master","sha":"24c543612f2dc36d9562454d609b341a78dd3896","user":{"login":"spinnaker","id":7634182,"avatar_url":"https://avatars.githubusercontent.com/u/7634182?v=3","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"repo":{"id":37556951,"name":"clouddriver","full_name":"spinnaker/clouddriver","owner":{"login":"spinnaker","id":7634182,"avatar_url":"https://avatars.githubusercontent.com/u/7634182?v=3","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spinnaker/clouddriver","description":"read and write operations across cloud providers","fork":false,"url":"https://api.github.com/repos/spinnaker/clouddriver","forks_url":"https://api.github.com/repos/spinnaker/clouddriver/forks","keys_url":"https://api.github.com/repos/spinnaker/clouddriver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spinnaker/clouddriver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spinnaker/clouddriver/teams","hooks_url":"https://api.github.com/repos/spinnaker/clouddriver/hooks","issue_events_url":"https://api.github.com/repos/spinnaker/clouddriver/issues/events{/number}","events_url":"https://api.github.com/repos/spinnaker/clouddriver/events","assignees_url":"https://api.github.com/repos/spinnaker/clouddriver/assignees{/user}","branches_url":"https://api.github.com/repos/spinnaker/clouddriver/branches{/branch}","tags_url":"https://api.github.com/repos/spinnaker/clouddriver/tags","blobs_url":"https://api.github.com/repos/spinnaker/clouddriver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spinnaker/clouddriver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spinnaker/clouddriver/git/refs{/sha}","trees_url":"https://api.github.com/repos/spinnaker/clouddriver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spinnaker/clouddriver/statuses/{sha}","languages_url":"https://api.github.com/repos/spinnaker/clouddriver/languages","stargazers_url":"https://api.github.com/repos/spinnaker/clouddriver/stargazers","contributors_url":"https://api.github.com/repos/spinnaker/clouddriver/contributors","subscribers_url":"https://api.github.com/repos/spinnaker/clouddriver/subscribers","subscription_url":"https://api.github.com/repos/spinnaker/clouddriver/subscription","commits_url":"https://api.github.com/repos/spinnaker/clouddriver/commits{/sha}","git_commits_url":"https://api.github.com/repos/spinnaker/clouddriver/git/commits{/sha}","comments_url":"https://api.github.com/repos/spinnaker/clouddriver/comments{/number}","issue_comment_url":"https://api.github.com/repos/spinnaker/clouddriver/issues/comments{/number}","contents_url":"https://api.github.com/repos/spinnaker/clouddriver/contents/{+path}","compare_url":"https://api.github.com/repos/spinnaker/clouddriver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spinnaker/clouddriver/merges","archive_url":"https://api.github.com/repos/spinnaker/clouddriver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spinnaker/clouddriver/downloads","issues_url":"https://api.github.com/repos/spinnaker/clouddriver/issues{/number}","pulls_url":"https://api.github.com/repos/spinnaker/clouddriver/pulls{/number}","milestones_url":"https://api.github.com/repos/spinnaker/clouddriver/milestones{/number}","notifications_url":"https://api.github.com/repos/spinnaker/clouddriver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spinnaker/clouddriver/labels{/name}","releases_url":"https://api.github.com/repos/spinnaker/clouddriver/releases{/id}","deployments_url":"https://api.github.com/repos/spinnaker/clouddriver/deployments","created_at":"2015-06-16T21:26:02Z","updated_at":"2016-03-31T08:21:13Z","pushed_at":"2016-03-31T17:44:34Z","git_url":"git://github.com/spinnaker/clouddriver.git","ssh_url":"git@github.com:spinnaker/clouddriver.git","clone_url":"https://github.com/spinnaker/clouddriver.git","svn_url":"https://github.com/spinnaker/clouddriver","homepage":null,"size":27582,"stargazers_count":43,"watchers_count":43,"language":"Groovy","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":12,"forks":47,"open_issues":12,"watchers":43,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/489"},"html":{"href":"https://github.com/spinnaker/clouddriver/pull/489"},"issue":{"href":"https://api.github.com/repos/spinnaker/clouddriver/issues/489"},"comments":{"href":"https://api.github.com/repos/spinnaker/clouddriver/issues/489/comments"},"review_comments":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/489/comments"},"review_comment":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/489/commits"},"statuses":{"href":"https://api.github.com/repos/spinnaker/clouddriver/statuses/7ef7c27d2496812bba457bb00b6fd330709e42e4"}}}}