{"action":"created","comment":{"url":"https://api.github.com/repos/amplifylitco/asiaq/pulls/comments/67184219","id":67184219,"diff_hunk":"@@ -409,6 +427,11 @@ def provision(self, ami, hostclass=None,\n \n         self.create_scaling_schedule(hostclass, min_size, desired_size, max_size)\n \n+        # Create alarms and custom metrics for the hostclass, if is not being used for testing\n+        if not testing:\n+            hostclass_alarms = self.alarm_configs.get_alarms(hostclass, group.name)\n+            self.alarms.create_alarms(hostclass_alarms)","path":"disco_aws_automation/disco_aws.py","position":49,"original_position":49,"commit_id":"b1677b255d405d4fccb582b97b241909e4394d4c","original_commit_id":"b1677b255d405d4fccb582b97b241909e4394d4c","user":{"login":"pchand-amplify","id":15693914,"avatar_url":"https://avatars.githubusercontent.com/u/15693914?v=3","gravatar_id":"","url":"https://api.github.com/users/pchand-amplify","html_url":"https://github.com/pchand-amplify","followers_url":"https://api.github.com/users/pchand-amplify/followers","following_url":"https://api.github.com/users/pchand-amplify/following{/other_user}","gists_url":"https://api.github.com/users/pchand-amplify/gists{/gist_id}","starred_url":"https://api.github.com/users/pchand-amplify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pchand-amplify/subscriptions","organizations_url":"https://api.github.com/users/pchand-amplify/orgs","repos_url":"https://api.github.com/users/pchand-amplify/repos","events_url":"https://api.github.com/users/pchand-amplify/events{/privacy}","received_events_url":"https://api.github.com/users/pchand-amplify/received_events","type":"User","site_admin":false},"body":"Why not move this logic to disco_alarms.py and keep disco_aws.py oblivious of the implementation of create_alarms?","created_at":"2016-06-15T15:27:17Z","updated_at":"2016-06-15T15:27:17Z","html_url":"https://github.com/amplifylitco/asiaq/pull/76#discussion_r67184219","pull_request_url":"https://api.github.com/repos/amplifylitco/asiaq/pulls/76","_links":{"self":{"href":"https://api.github.com/repos/amplifylitco/asiaq/pulls/comments/67184219"},"html":{"href":"https://github.com/amplifylitco/asiaq/pull/76#discussion_r67184219"},"pull_request":{"href":"https://api.github.com/repos/amplifylitco/asiaq/pulls/76"}}},"pull_request":{"url":"https://api.github.com/repos/amplifylitco/asiaq/pulls/76","id":73433372,"html_url":"https://github.com/amplifylitco/asiaq/pull/76","diff_url":"https://github.com/amplifylitco/asiaq/pull/76.diff","patch_url":"https://github.com/amplifylitco/asiaq/pull/76.patch","issue_url":"https://api.github.com/repos/amplifylitco/asiaq/issues/76","number":76,"state":"open","locked":false,"title":"Make alarms work with dynamic ASG names","user":{"login":"jconstance-amplify","id":15661993,"avatar_url":"https://avatars.githubusercontent.com/u/15661993?v=3","gravatar_id":"","url":"https://api.github.com/users/jconstance-amplify","html_url":"https://github.com/jconstance-amplify","followers_url":"https://api.github.com/users/jconstance-amplify/followers","following_url":"https://api.github.com/users/jconstance-amplify/following{/other_user}","gists_url":"https://api.github.com/users/jconstance-amplify/gists{/gist_id}","starred_url":"https://api.github.com/users/jconstance-amplify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jconstance-amplify/subscriptions","organizations_url":"https://api.github.com/users/jconstance-amplify/orgs","repos_url":"https://api.github.com/users/jconstance-amplify/repos","events_url":"https://api.github.com/users/jconstance-amplify/events{/privacy}","received_events_url":"https://api.github.com/users/jconstance-amplify/received_events","type":"User","site_admin":false},"body":"DiscoAlarms was assuming that the names of autoscaling group was static,\r\nbut that is no longer true due to changes necessary for blue/green\r\ndeployment. Instead, when alarms are being configured for a hostclass,\r\nthe autoscaling group name can now be provided along with that call, or\r\nthe DiscoAlarmsConfig now has the capability to grab the autoscaling\r\ngroup name if one was not provided and the namespace is 'AWS/EC2'.\r\n\r\nAdditionally, because autoscaling group names are not part of the\r\nnamespacing of the alarm names, there was a possible problem where\r\nblue/green deployment might update alarms to point to the new autoscaling group, destroy that autoscaling group when tests fail, and then not repoint the alarms to the old autoscaling group. To resolve this, alarms are not created for\r\nautoscaling groups that are marked with 'is_testing'. Instead, alarms\r\nwill be created for that autoscaling group after it passes tests,\r\nsimilar to how we handle ELB switchover.\r\n\r\nAlso added some unit tests to ensure that we try to lookup the\r\nautoscaling group name when it isn't provided.","created_at":"2016-06-10T20:45:03Z","updated_at":"2016-06-15T15:27:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9dc3b8aed4056ba12fcda052e717bf707a58735d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/amplifylitco/asiaq/pulls/76/commits","review_comments_url":"https://api.github.com/repos/amplifylitco/asiaq/pulls/76/comments","review_comment_url":"https://api.github.com/repos/amplifylitco/asiaq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amplifylitco/asiaq/issues/76/comments","statuses_url":"https://api.github.com/repos/amplifylitco/asiaq/statuses/b1677b255d405d4fccb582b97b241909e4394d4c","head":{"label":"amplifylitco:bugfix/dynamic_asgs_and_alarms","ref":"bugfix/dynamic_asgs_and_alarms","sha":"b1677b255d405d4fccb582b97b241909e4394d4c","user":{"login":"amplifylitco","id":15659472,"avatar_url":"https://avatars.githubusercontent.com/u/15659472?v=3","gravatar_id":"","url":"https://api.github.com/users/amplifylitco","html_url":"https://github.com/amplifylitco","followers_url":"https://api.github.com/users/amplifylitco/followers","following_url":"https://api.github.com/users/amplifylitco/following{/other_user}","gists_url":"https://api.github.com/users/amplifylitco/gists{/gist_id}","starred_url":"https://api.github.com/users/amplifylitco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplifylitco/subscriptions","organizations_url":"https://api.github.com/users/amplifylitco/orgs","repos_url":"https://api.github.com/users/amplifylitco/repos","events_url":"https://api.github.com/users/amplifylitco/events{/privacy}","received_events_url":"https://api.github.com/users/amplifylitco/received_events","type":"Organization","site_admin":false},"repo":{"id":53361236,"name":"asiaq","full_name":"amplifylitco/asiaq","owner":{"login":"amplifylitco","id":15659472,"avatar_url":"https://avatars.githubusercontent.com/u/15659472?v=3","gravatar_id":"","url":"https://api.github.com/users/amplifylitco","html_url":"https://github.com/amplifylitco","followers_url":"https://api.github.com/users/amplifylitco/followers","following_url":"https://api.github.com/users/amplifylitco/following{/other_user}","gists_url":"https://api.github.com/users/amplifylitco/gists{/gist_id}","starred_url":"https://api.github.com/users/amplifylitco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplifylitco/subscriptions","organizations_url":"https://api.github.com/users/amplifylitco/orgs","repos_url":"https://api.github.com/users/amplifylitco/repos","events_url":"https://api.github.com/users/amplifylitco/events{/privacy}","received_events_url":"https://api.github.com/users/amplifylitco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amplifylitco/asiaq","description":"","fork":false,"url":"https://api.github.com/repos/amplifylitco/asiaq","forks_url":"https://api.github.com/repos/amplifylitco/asiaq/forks","keys_url":"https://api.github.com/repos/amplifylitco/asiaq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amplifylitco/asiaq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amplifylitco/asiaq/teams","hooks_url":"https://api.github.com/repos/amplifylitco/asiaq/hooks","issue_events_url":"https://api.github.com/repos/amplifylitco/asiaq/issues/events{/number}","events_url":"https://api.github.com/repos/amplifylitco/asiaq/events","assignees_url":"https://api.github.com/repos/amplifylitco/asiaq/assignees{/user}","branches_url":"https://api.github.com/repos/amplifylitco/asiaq/branches{/branch}","tags_url":"https://api.github.com/repos/amplifylitco/asiaq/tags","blobs_url":"https://api.github.com/repos/amplifylitco/asiaq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amplifylitco/asiaq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amplifylitco/asiaq/git/refs{/sha}","trees_url":"https://api.github.com/repos/amplifylitco/asiaq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amplifylitco/asiaq/statuses/{sha}","languages_url":"https://api.github.com/repos/amplifylitco/asiaq/languages","stargazers_url":"https://api.github.com/repos/amplifylitco/asiaq/stargazers","contributors_url":"https://api.github.com/repos/amplifylitco/asiaq/contributors","subscribers_url":"https://api.github.com/repos/amplifylitco/asiaq/subscribers","subscription_url":"https://api.github.com/repos/amplifylitco/asiaq/subscription","commits_url":"https://api.github.com/repos/amplifylitco/asiaq/commits{/sha}","git_commits_url":"https://api.github.com/repos/amplifylitco/asiaq/git/commits{/sha}","comments_url":"https://api.github.com/repos/amplifylitco/asiaq/comments{/number}","issue_comment_url":"https://api.github.com/repos/amplifylitco/asiaq/issues/comments{/number}","contents_url":"https://api.github.com/repos/amplifylitco/asiaq/contents/{+path}","compare_url":"https://api.github.com/repos/amplifylitco/asiaq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amplifylitco/asiaq/merges","archive_url":"https://api.github.com/repos/amplifylitco/asiaq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amplifylitco/asiaq/downloads","issues_url":"https://api.github.com/repos/amplifylitco/asiaq/issues{/number}","pulls_url":"https://api.github.com/repos/amplifylitco/asiaq/pulls{/number}","milestones_url":"https://api.github.com/repos/amplifylitco/asiaq/milestones{/number}","notifications_url":"https://api.github.com/repos/amplifylitco/asiaq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amplifylitco/asiaq/labels{/name}","releases_url":"https://api.github.com/repos/amplifylitco/asiaq/releases{/id}","deployments_url":"https://api.github.com/repos/amplifylitco/asiaq/deployments","created_at":"2016-03-07T21:41:20Z","updated_at":"2016-04-06T06:21:13Z","pushed_at":"2016-06-15T12:59:29Z","git_url":"git://github.com/amplifylitco/asiaq.git","ssh_url":"git@github.com:amplifylitco/asiaq.git","clone_url":"https://github.com/amplifylitco/asiaq.git","svn_url":"https://github.com/amplifylitco/asiaq","homepage":null,"size":962,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":11,"forks":1,"open_issues":11,"watchers":7,"default_branch":"master"}},"base":{"label":"amplifylitco:master","ref":"master","sha":"adc8d7b85cfb7a92c8c3631c8b754e80a26d0f21","user":{"login":"amplifylitco","id":15659472,"avatar_url":"https://avatars.githubusercontent.com/u/15659472?v=3","gravatar_id":"","url":"https://api.github.com/users/amplifylitco","html_url":"https://github.com/amplifylitco","followers_url":"https://api.github.com/users/amplifylitco/followers","following_url":"https://api.github.com/users/amplifylitco/following{/other_user}","gists_url":"https://api.github.com/users/amplifylitco/gists{/gist_id}","starred_url":"https://api.github.com/users/amplifylitco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplifylitco/subscriptions","organizations_url":"https://api.github.com/users/amplifylitco/orgs","repos_url":"https://api.github.com/users/amplifylitco/repos","events_url":"https://api.github.com/users/amplifylitco/events{/privacy}","received_events_url":"https://api.github.com/users/amplifylitco/received_events","type":"Organization","site_admin":false},"repo":{"id":53361236,"name":"asiaq","full_name":"amplifylitco/asiaq","owner":{"login":"amplifylitco","id":15659472,"avatar_url":"https://avatars.githubusercontent.com/u/15659472?v=3","gravatar_id":"","url":"https://api.github.com/users/amplifylitco","html_url":"https://github.com/amplifylitco","followers_url":"https://api.github.com/users/amplifylitco/followers","following_url":"https://api.github.com/users/amplifylitco/following{/other_user}","gists_url":"https://api.github.com/users/amplifylitco/gists{/gist_id}","starred_url":"https://api.github.com/users/amplifylitco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplifylitco/subscriptions","organizations_url":"https://api.github.com/users/amplifylitco/orgs","repos_url":"https://api.github.com/users/amplifylitco/repos","events_url":"https://api.github.com/users/amplifylitco/events{/privacy}","received_events_url":"https://api.github.com/users/amplifylitco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amplifylitco/asiaq","description":"","fork":false,"url":"https://api.github.com/repos/amplifylitco/asiaq","forks_url":"https://api.github.com/repos/amplifylitco/asiaq/forks","keys_url":"https://api.github.com/repos/amplifylitco/asiaq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amplifylitco/asiaq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amplifylitco/asiaq/teams","hooks_url":"https://api.github.com/repos/amplifylitco/asiaq/hooks","issue_events_url":"https://api.github.com/repos/amplifylitco/asiaq/issues/events{/number}","events_url":"https://api.github.com/repos/amplifylitco/asiaq/events","assignees_url":"https://api.github.com/repos/amplifylitco/asiaq/assignees{/user}","branches_url":"https://api.github.com/repos/amplifylitco/asiaq/branches{/branch}","tags_url":"https://api.github.com/repos/amplifylitco/asiaq/tags","blobs_url":"https://api.github.com/repos/amplifylitco/asiaq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amplifylitco/asiaq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amplifylitco/asiaq/git/refs{/sha}","trees_url":"https://api.github.com/repos/amplifylitco/asiaq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amplifylitco/asiaq/statuses/{sha}","languages_url":"https://api.github.com/repos/amplifylitco/asiaq/languages","stargazers_url":"https://api.github.com/repos/amplifylitco/asiaq/stargazers","contributors_url":"https://api.github.com/repos/amplifylitco/asiaq/contributors","subscribers_url":"https://api.github.com/repos/amplifylitco/asiaq/subscribers","subscription_url":"https://api.github.com/repos/amplifylitco/asiaq/subscription","commits_url":"https://api.github.com/repos/amplifylitco/asiaq/commits{/sha}","git_commits_url":"https://api.github.com/repos/amplifylitco/asiaq/git/commits{/sha}","comments_url":"https://api.github.com/repos/amplifylitco/asiaq/comments{/number}","issue_comment_url":"https://api.github.com/repos/amplifylitco/asiaq/issues/comments{/number}","contents_url":"https://api.github.com/repos/amplifylitco/asiaq/contents/{+path}","compare_url":"https://api.github.com/repos/amplifylitco/asiaq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amplifylitco/asiaq/merges","archive_url":"https://api.github.com/repos/amplifylitco/asiaq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amplifylitco/asiaq/downloads","issues_url":"https://api.github.com/repos/amplifylitco/asiaq/issues{/number}","pulls_url":"https://api.github.com/repos/amplifylitco/asiaq/pulls{/number}","milestones_url":"https://api.github.com/repos/amplifylitco/asiaq/milestones{/number}","notifications_url":"https://api.github.com/repos/amplifylitco/asiaq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amplifylitco/asiaq/labels{/name}","releases_url":"https://api.github.com/repos/amplifylitco/asiaq/releases{/id}","deployments_url":"https://api.github.com/repos/amplifylitco/asiaq/deployments","created_at":"2016-03-07T21:41:20Z","updated_at":"2016-04-06T06:21:13Z","pushed_at":"2016-06-15T12:59:29Z","git_url":"git://github.com/amplifylitco/asiaq.git","ssh_url":"git@github.com:amplifylitco/asiaq.git","clone_url":"https://github.com/amplifylitco/asiaq.git","svn_url":"https://github.com/amplifylitco/asiaq","homepage":null,"size":962,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":11,"forks":1,"open_issues":11,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amplifylitco/asiaq/pulls/76"},"html":{"href":"https://github.com/amplifylitco/asiaq/pull/76"},"issue":{"href":"https://api.github.com/repos/amplifylitco/asiaq/issues/76"},"comments":{"href":"https://api.github.com/repos/amplifylitco/asiaq/issues/76/comments"},"review_comments":{"href":"https://api.github.com/repos/amplifylitco/asiaq/pulls/76/comments"},"review_comment":{"href":"https://api.github.com/repos/amplifylitco/asiaq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amplifylitco/asiaq/pulls/76/commits"},"statuses":{"href":"https://api.github.com/repos/amplifylitco/asiaq/statuses/b1677b255d405d4fccb582b97b241909e4394d4c"}}}}
{"actor":{"display_login":"pchand-amplify"}}