{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/comments/73225590","id":73225590,"diff_hunk":"@@ -175,3 +177,145 @@ def test_create_and_delete_metric_descriptor(self):\n         descriptor.delete()\n         with self.assertRaises(NotFound):\n             descriptor.delete()\n+\n+\n+class TestMonitoringGroups(unittest2.TestCase):\n+\n+    def setUp(self):\n+        self.to_delete = []\n+        self.DISPLAY_NAME = 'Testing: New group'\n+        self.FILTER = 'resource.type = \"gce_instance\"'\n+        self.IS_CLUSTER = True\n+\n+    def tearDown(self):\n+        for group in self.to_delete:\n+            backoff_intervals = [1, 2, 4, 8]\n+            while True:\n+                try:\n+                    group.delete()\n+                    break\n+                except NotFound:\n+                    if backoff_intervals:\n+                        time.sleep(backoff_intervals.pop(0))\n+                    else:\n+                        raise\n+\n+    def test_create_group(self):\n+        client = monitoring.Client()\n+        group = client.group(\n+            display_name=self.DISPLAY_NAME,\n+            filter_string=self.FILTER,\n+            is_cluster=self.IS_CLUSTER,\n+        )\n+        group.create()\n+        self.to_delete.append(group)\n+        self.assertTrue(group.exists())","path":"system_tests/monitoring.py","position":45,"original_position":45,"commit_id":"462b1139689297b61a83f4fa8ef4201e0ded7341","original_commit_id":"f1a533fc41877fce9b7289be83a46a5d6a234769","user":{"login":"rimey","id":360806,"avatar_url":"https://avatars.githubusercontent.com/u/360806?v=3","gravatar_id":"","url":"https://api.github.com/users/rimey","html_url":"https://github.com/rimey","followers_url":"https://api.github.com/users/rimey/followers","following_url":"https://api.github.com/users/rimey/following{/other_user}","gists_url":"https://api.github.com/users/rimey/gists{/gist_id}","starred_url":"https://api.github.com/users/rimey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rimey/subscriptions","organizations_url":"https://api.github.com/users/rimey/orgs","repos_url":"https://api.github.com/users/rimey/repos","events_url":"https://api.github.com/users/rimey/events{/privacy}","received_events_url":"https://api.github.com/users/rimey/received_events","type":"User","site_admin":false},"body":"I don't know for sure. I would not add retry logic unless you have concrete reason to believe that read after write doesn't always work.","created_at":"2016-08-02T19:57:25Z","updated_at":"2016-08-02T19:57:25Z","html_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/2035#discussion_r73225590","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/2035","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/comments/73225590"},"html":{"href":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/2035#discussion_r73225590"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/2035"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/2035","id":79431262,"html_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/2035","diff_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/2035.diff","patch_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/2035.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/2035","number":2035,"state":"open","locked":false,"title":"Add Group support to the Monitoring API","user":{"login":"supriyagarg","id":11726936,"avatar_url":"https://avatars.githubusercontent.com/u/11726936?v=3","gravatar_id":"","url":"https://api.github.com/users/supriyagarg","html_url":"https://github.com/supriyagarg","followers_url":"https://api.github.com/users/supriyagarg/followers","following_url":"https://api.github.com/users/supriyagarg/following{/other_user}","gists_url":"https://api.github.com/users/supriyagarg/gists{/gist_id}","starred_url":"https://api.github.com/users/supriyagarg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supriyagarg/subscriptions","organizations_url":"https://api.github.com/users/supriyagarg/orgs","repos_url":"https://api.github.com/users/supriyagarg/repos","events_url":"https://api.github.com/users/supriyagarg/events{/privacy}","received_events_url":"https://api.github.com/users/supriyagarg/received_events","type":"User","site_admin":false},"body":"This change allows users to both read and write Stackdriver groups. It allows users to:\r\n\r\n* fetch groups\r\n* list groups\r\n* list a group's ancestors, descendants, and children groups\r\n* create, update, and delete groups.\r\n* list a group's members\r\n","created_at":"2016-07-29T22:02:41Z","updated_at":"2016-08-02T19:57:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0e61381b79f5c4da9bbc5b5b180251ce8534695e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/2035/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/2035/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/2035/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/statuses/462b1139689297b61a83f4fa8ef4201e0ded7341","head":{"label":"supriyagarg:monitoring-api","ref":"monitoring-api","sha":"462b1139689297b61a83f4fa8ef4201e0ded7341","user":{"login":"supriyagarg","id":11726936,"avatar_url":"https://avatars.githubusercontent.com/u/11726936?v=3","gravatar_id":"","url":"https://api.github.com/users/supriyagarg","html_url":"https://github.com/supriyagarg","followers_url":"https://api.github.com/users/supriyagarg/followers","following_url":"https://api.github.com/users/supriyagarg/following{/other_user}","gists_url":"https://api.github.com/users/supriyagarg/gists{/gist_id}","starred_url":"https://api.github.com/users/supriyagarg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supriyagarg/subscriptions","organizations_url":"https://api.github.com/users/supriyagarg/orgs","repos_url":"https://api.github.com/users/supriyagarg/repos","events_url":"https://api.github.com/users/supriyagarg/events{/privacy}","received_events_url":"https://api.github.com/users/supriyagarg/received_events","type":"User","site_admin":false},"repo":{"id":64252930,"name":"gcloud-python","full_name":"supriyagarg/gcloud-python","owner":{"login":"supriyagarg","id":11726936,"avatar_url":"https://avatars.githubusercontent.com/u/11726936?v=3","gravatar_id":"","url":"https://api.github.com/users/supriyagarg","html_url":"https://github.com/supriyagarg","followers_url":"https://api.github.com/users/supriyagarg/followers","following_url":"https://api.github.com/users/supriyagarg/following{/other_user}","gists_url":"https://api.github.com/users/supriyagarg/gists{/gist_id}","starred_url":"https://api.github.com/users/supriyagarg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supriyagarg/subscriptions","organizations_url":"https://api.github.com/users/supriyagarg/orgs","repos_url":"https://api.github.com/users/supriyagarg/repos","events_url":"https://api.github.com/users/supriyagarg/events{/privacy}","received_events_url":"https://api.github.com/users/supriyagarg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/supriyagarg/gcloud-python","description":"Google Cloud Client Library for Python","fork":true,"url":"https://api.github.com/repos/supriyagarg/gcloud-python","forks_url":"https://api.github.com/repos/supriyagarg/gcloud-python/forks","keys_url":"https://api.github.com/repos/supriyagarg/gcloud-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/supriyagarg/gcloud-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/supriyagarg/gcloud-python/teams","hooks_url":"https://api.github.com/repos/supriyagarg/gcloud-python/hooks","issue_events_url":"https://api.github.com/repos/supriyagarg/gcloud-python/issues/events{/number}","events_url":"https://api.github.com/repos/supriyagarg/gcloud-python/events","assignees_url":"https://api.github.com/repos/supriyagarg/gcloud-python/assignees{/user}","branches_url":"https://api.github.com/repos/supriyagarg/gcloud-python/branches{/branch}","tags_url":"https://api.github.com/repos/supriyagarg/gcloud-python/tags","blobs_url":"https://api.github.com/repos/supriyagarg/gcloud-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/supriyagarg/gcloud-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/supriyagarg/gcloud-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/supriyagarg/gcloud-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/supriyagarg/gcloud-python/statuses/{sha}","languages_url":"https://api.github.com/repos/supriyagarg/gcloud-python/languages","stargazers_url":"https://api.github.com/repos/supriyagarg/gcloud-python/stargazers","contributors_url":"https://api.github.com/repos/supriyagarg/gcloud-python/contributors","subscribers_url":"https://api.github.com/repos/supriyagarg/gcloud-python/subscribers","subscription_url":"https://api.github.com/repos/supriyagarg/gcloud-python/subscription","commits_url":"https://api.github.com/repos/supriyagarg/gcloud-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/supriyagarg/gcloud-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/supriyagarg/gcloud-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/supriyagarg/gcloud-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/supriyagarg/gcloud-python/contents/{+path}","compare_url":"https://api.github.com/repos/supriyagarg/gcloud-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/supriyagarg/gcloud-python/merges","archive_url":"https://api.github.com/repos/supriyagarg/gcloud-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/supriyagarg/gcloud-python/downloads","issues_url":"https://api.github.com/repos/supriyagarg/gcloud-python/issues{/number}","pulls_url":"https://api.github.com/repos/supriyagarg/gcloud-python/pulls{/number}","milestones_url":"https://api.github.com/repos/supriyagarg/gcloud-python/milestones{/number}","notifications_url":"https://api.github.com/repos/supriyagarg/gcloud-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/supriyagarg/gcloud-python/labels{/name}","releases_url":"https://api.github.com/repos/supriyagarg/gcloud-python/releases{/id}","deployments_url":"https://api.github.com/repos/supriyagarg/gcloud-python/deployments","created_at":"2016-07-26T20:38:58Z","updated_at":"2016-07-26T20:39:02Z","pushed_at":"2016-08-02T00:26:46Z","git_url":"git://github.com/supriyagarg/gcloud-python.git","ssh_url":"git@github.com:supriyagarg/gcloud-python.git","clone_url":"https://github.com/supriyagarg/gcloud-python.git","svn_url":"https://github.com/supriyagarg/gcloud-python","homepage":"https://googlecloudplatform.github.io/gcloud-python/","size":68313,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"GoogleCloudPlatform:master","ref":"master","sha":"5a6ba14fda655761d7104f3c8ef14d88d881de24","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":16316451,"name":"gcloud-python","full_name":"GoogleCloudPlatform/gcloud-python","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/gcloud-python","description":"Google Cloud Client Library for Python","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/deployments","created_at":"2014-01-28T15:51:47Z","updated_at":"2016-07-29T13:25:42Z","pushed_at":"2016-08-02T19:47:12Z","git_url":"git://github.com/GoogleCloudPlatform/gcloud-python.git","ssh_url":"git@github.com:GoogleCloudPlatform/gcloud-python.git","clone_url":"https://github.com/GoogleCloudPlatform/gcloud-python.git","svn_url":"https://github.com/GoogleCloudPlatform/gcloud-python","homepage":"https://googlecloudplatform.github.io/gcloud-python/","size":70842,"stargazers_count":361,"watchers_count":361,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":186,"mirror_url":null,"open_issues_count":160,"forks":186,"open_issues":160,"watchers":361,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/2035"},"html":{"href":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/2035"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/2035"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/2035/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/2035/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/2035/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/statuses/462b1139689297b61a83f4fa8ef4201e0ded7341"}}}}
{"actor":{"display_login":"rimey"}}