{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-beam/pulls/comments/80785908","pull_request_review_id":1816293,"id":80785908,"diff_hunk":"@@ -380,6 +382,56 @@ public void testRetryFileSize() throws IOException {\n   }\n \n   @Test\n+  public void testCreateBucket() throws IOException {\n+    GcsOptions pipelineOptions = gcsOptionsWithTestCredential();\n+    GcsUtil gcsUtil = pipelineOptions.getGcsUtil();\n+\n+    Storage.Buckets mockStorageObjects = Mockito.mock(Storage.Buckets.class);\n+    Storage mockStorage = Mockito.mock(Storage.class);\n+    gcsUtil.setStorageClient(mockStorage);\n+\n+    Storage.Buckets.Insert mockStorageInsert = Mockito.mock(Storage.Buckets.Insert.class);\n+\n+    BackOff mockBackOff = FluentBackoff.DEFAULT.backoff();\n+\n+    when(mockStorage.buckets()).thenReturn(mockStorageObjects);\n+    when(mockStorageObjects.insert(\n+           any(String.class), any(Bucket.class))).thenReturn(mockStorageInsert);\n+    when(mockStorageInsert.execute())\n+        .thenThrow(new SocketTimeoutException(\"SocketException\"))\n+        .thenReturn(new Bucket());\n+\n+    gcsUtil.createBucket(\"a\", new Bucket(), mockBackOff, new FastNanoClockAndSleeper());\n+  }\n+\n+  @Test\n+  public void testCreateBucketAccessErrors() throws IOException {\n+    GcsOptions pipelineOptions = gcsOptionsWithTestCredential();\n+    GcsUtil gcsUtil = pipelineOptions.getGcsUtil();\n+\n+    Storage mockStorage = Mockito.mock(Storage.class);\n+    gcsUtil.setStorageClient(mockStorage);\n+\n+    Storage.Buckets mockStorageObjects = Mockito.mock(Storage.Buckets.class);\n+    Storage.Buckets.Insert mockStorageInsert = Mockito.mock(Storage.Buckets.Insert.class);\n+\n+    BackOff mockBackOff = FluentBackoff.DEFAULT.backoff();\n+    GoogleJsonResponseException expectedException =\n+        googleJsonResponseException(HttpStatusCodes.STATUS_CODE_FORBIDDEN,\n+            \"Waves hand mysteriously\", \"These aren't the buckets your looking for\");","path":"sdks/java/core/src/test/java/org/apache/beam/sdk/util/GcsUtilTest.java","position":56,"original_position":56,"commit_id":"2b92e281dd578af9c27947e4c1e76682f9bbeb33","original_commit_id":"2b92e281dd578af9c27947e4c1e76682f9bbeb33","user":{"login":"tgroh","id":429866,"avatar_url":"https://avatars.githubusercontent.com/u/429866?v=3","gravatar_id":"","url":"https://api.github.com/users/tgroh","html_url":"https://github.com/tgroh","followers_url":"https://api.github.com/users/tgroh/followers","following_url":"https://api.github.com/users/tgroh/following{/other_user}","gists_url":"https://api.github.com/users/tgroh/gists{/gist_id}","starred_url":"https://api.github.com/users/tgroh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgroh/subscriptions","organizations_url":"https://api.github.com/users/tgroh/orgs","repos_url":"https://api.github.com/users/tgroh/repos","events_url":"https://api.github.com/users/tgroh/events{/privacy}","received_events_url":"https://api.github.com/users/tgroh/received_events","type":"User","site_admin":false},"body":"you're\r\n\r\n(My god I'm thrilled to be able to leave this comment)","created_at":"2016-09-27T20:23:57Z","updated_at":"2016-09-27T20:26:30Z","html_url":"https://github.com/apache/incubator-beam/pull/1014#discussion_r80785908","pull_request_url":"https://api.github.com/repos/apache/incubator-beam/pulls/1014","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/comments/80785908"},"html":{"href":"https://github.com/apache/incubator-beam/pull/1014#discussion_r80785908"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/1014"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-beam/pulls/1014","id":86855832,"html_url":"https://github.com/apache/incubator-beam/pull/1014","diff_url":"https://github.com/apache/incubator-beam/pull/1014.diff","patch_url":"https://github.com/apache/incubator-beam/pull/1014.patch","issue_url":"https://api.github.com/repos/apache/incubator-beam/issues/1014","number":1014,"state":"open","locked":false,"title":"Add initial scaffolding for default bucket (take 2)","user":{"login":"sammcveety","id":2364801,"avatar_url":"https://avatars.githubusercontent.com/u/2364801?v=3","gravatar_id":"","url":"https://api.github.com/users/sammcveety","html_url":"https://github.com/sammcveety","followers_url":"https://api.github.com/users/sammcveety/followers","following_url":"https://api.github.com/users/sammcveety/following{/other_user}","gists_url":"https://api.github.com/users/sammcveety/gists{/gist_id}","starred_url":"https://api.github.com/users/sammcveety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sammcveety/subscriptions","organizations_url":"https://api.github.com/users/sammcveety/orgs","repos_url":"https://api.github.com/users/sammcveety/repos","events_url":"https://api.github.com/users/sammcveety/events{/privacy}","received_events_url":"https://api.github.com/users/sammcveety/received_events","type":"User","site_admin":false},"body":"@tgroh, could you please take a look?\r\n\r\n- Provide a hook for determining the project number associated with a bucket\r\n- Provide an API for looking up the project number from a project ID\r\n\r\nRe-opened because the other PR wasn't clearing the extra commit history, despite the branch being correct.","created_at":"2016-09-27T03:16:39Z","updated_at":"2016-09-27T20:26:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ffcbc8a76d5ceed310472af4d849254956b7f57c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-beam/pulls/1014/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-beam/pulls/1014/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-beam/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-beam/issues/1014/comments","statuses_url":"https://api.github.com/repos/apache/incubator-beam/statuses/2b92e281dd578af9c27947e4c1e76682f9bbeb33","head":{"label":"sammcveety:sgmc/default_bucket","ref":"sgmc/default_bucket","sha":"2b92e281dd578af9c27947e4c1e76682f9bbeb33","user":{"login":"sammcveety","id":2364801,"avatar_url":"https://avatars.githubusercontent.com/u/2364801?v=3","gravatar_id":"","url":"https://api.github.com/users/sammcveety","html_url":"https://github.com/sammcveety","followers_url":"https://api.github.com/users/sammcveety/followers","following_url":"https://api.github.com/users/sammcveety/following{/other_user}","gists_url":"https://api.github.com/users/sammcveety/gists{/gist_id}","starred_url":"https://api.github.com/users/sammcveety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sammcveety/subscriptions","organizations_url":"https://api.github.com/users/sammcveety/orgs","repos_url":"https://api.github.com/users/sammcveety/repos","events_url":"https://api.github.com/users/sammcveety/events{/privacy}","received_events_url":"https://api.github.com/users/sammcveety/received_events","type":"User","site_admin":false},"repo":{"id":63892406,"name":"incubator-beam","full_name":"sammcveety/incubator-beam","owner":{"login":"sammcveety","id":2364801,"avatar_url":"https://avatars.githubusercontent.com/u/2364801?v=3","gravatar_id":"","url":"https://api.github.com/users/sammcveety","html_url":"https://github.com/sammcveety","followers_url":"https://api.github.com/users/sammcveety/followers","following_url":"https://api.github.com/users/sammcveety/following{/other_user}","gists_url":"https://api.github.com/users/sammcveety/gists{/gist_id}","starred_url":"https://api.github.com/users/sammcveety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sammcveety/subscriptions","organizations_url":"https://api.github.com/users/sammcveety/orgs","repos_url":"https://api.github.com/users/sammcveety/repos","events_url":"https://api.github.com/users/sammcveety/events{/privacy}","received_events_url":"https://api.github.com/users/sammcveety/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sammcveety/incubator-beam","description":"Mirror of Apache Beam (Incubating)","fork":true,"url":"https://api.github.com/repos/sammcveety/incubator-beam","forks_url":"https://api.github.com/repos/sammcveety/incubator-beam/forks","keys_url":"https://api.github.com/repos/sammcveety/incubator-beam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sammcveety/incubator-beam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sammcveety/incubator-beam/teams","hooks_url":"https://api.github.com/repos/sammcveety/incubator-beam/hooks","issue_events_url":"https://api.github.com/repos/sammcveety/incubator-beam/issues/events{/number}","events_url":"https://api.github.com/repos/sammcveety/incubator-beam/events","assignees_url":"https://api.github.com/repos/sammcveety/incubator-beam/assignees{/user}","branches_url":"https://api.github.com/repos/sammcveety/incubator-beam/branches{/branch}","tags_url":"https://api.github.com/repos/sammcveety/incubator-beam/tags","blobs_url":"https://api.github.com/repos/sammcveety/incubator-beam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sammcveety/incubator-beam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sammcveety/incubator-beam/git/refs{/sha}","trees_url":"https://api.github.com/repos/sammcveety/incubator-beam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sammcveety/incubator-beam/statuses/{sha}","languages_url":"https://api.github.com/repos/sammcveety/incubator-beam/languages","stargazers_url":"https://api.github.com/repos/sammcveety/incubator-beam/stargazers","contributors_url":"https://api.github.com/repos/sammcveety/incubator-beam/contributors","subscribers_url":"https://api.github.com/repos/sammcveety/incubator-beam/subscribers","subscription_url":"https://api.github.com/repos/sammcveety/incubator-beam/subscription","commits_url":"https://api.github.com/repos/sammcveety/incubator-beam/commits{/sha}","git_commits_url":"https://api.github.com/repos/sammcveety/incubator-beam/git/commits{/sha}","comments_url":"https://api.github.com/repos/sammcveety/incubator-beam/comments{/number}","issue_comment_url":"https://api.github.com/repos/sammcveety/incubator-beam/issues/comments{/number}","contents_url":"https://api.github.com/repos/sammcveety/incubator-beam/contents/{+path}","compare_url":"https://api.github.com/repos/sammcveety/incubator-beam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sammcveety/incubator-beam/merges","archive_url":"https://api.github.com/repos/sammcveety/incubator-beam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sammcveety/incubator-beam/downloads","issues_url":"https://api.github.com/repos/sammcveety/incubator-beam/issues{/number}","pulls_url":"https://api.github.com/repos/sammcveety/incubator-beam/pulls{/number}","milestones_url":"https://api.github.com/repos/sammcveety/incubator-beam/milestones{/number}","notifications_url":"https://api.github.com/repos/sammcveety/incubator-beam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sammcveety/incubator-beam/labels{/name}","releases_url":"https://api.github.com/repos/sammcveety/incubator-beam/releases{/id}","deployments_url":"https://api.github.com/repos/sammcveety/incubator-beam/deployments","created_at":"2016-07-21T18:17:58Z","updated_at":"2016-07-21T18:18:03Z","pushed_at":"2016-09-27T19:51:26Z","git_url":"git://github.com/sammcveety/incubator-beam.git","ssh_url":"git@github.com:sammcveety/incubator-beam.git","clone_url":"https://github.com/sammcveety/incubator-beam.git","svn_url":"https://github.com/sammcveety/incubator-beam","homepage":null,"size":19405,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"apache:master","ref":"master","sha":"68010aba16f0660069d9eebdeb1ddf1f40d38414","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":50904245,"name":"incubator-beam","full_name":"apache/incubator-beam","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/incubator-beam","description":"Mirror of Apache Beam (Incubating)","fork":false,"url":"https://api.github.com/repos/apache/incubator-beam","forks_url":"https://api.github.com/repos/apache/incubator-beam/forks","keys_url":"https://api.github.com/repos/apache/incubator-beam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-beam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-beam/teams","hooks_url":"https://api.github.com/repos/apache/incubator-beam/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-beam/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-beam/events","assignees_url":"https://api.github.com/repos/apache/incubator-beam/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-beam/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-beam/tags","blobs_url":"https://api.github.com/repos/apache/incubator-beam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-beam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-beam/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-beam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-beam/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-beam/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-beam/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-beam/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-beam/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-beam/subscription","commits_url":"https://api.github.com/repos/apache/incubator-beam/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-beam/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-beam/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-beam/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-beam/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-beam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-beam/merges","archive_url":"https://api.github.com/repos/apache/incubator-beam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-beam/downloads","issues_url":"https://api.github.com/repos/apache/incubator-beam/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-beam/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-beam/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-beam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-beam/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-beam/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-beam/deployments","created_at":"2016-02-02T08:00:06Z","updated_at":"2016-09-27T11:35:59Z","pushed_at":"2016-09-27T20:18:07Z","git_url":"git://github.com/apache/incubator-beam.git","ssh_url":"git@github.com:apache/incubator-beam.git","clone_url":"https://github.com/apache/incubator-beam.git","svn_url":"https://github.com/apache/incubator-beam","homepage":null,"size":28693,"stargazers_count":369,"watchers_count":369,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":226,"mirror_url":"git://git.apache.org/incubator-beam.git","open_issues_count":52,"forks":226,"open_issues":52,"watchers":369,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/1014"},"html":{"href":"https://github.com/apache/incubator-beam/pull/1014"},"issue":{"href":"https://api.github.com/repos/apache/incubator-beam/issues/1014"},"comments":{"href":"https://api.github.com/repos/apache/incubator-beam/issues/1014/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/1014/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/1014/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-beam/statuses/2b92e281dd578af9c27947e4c1e76682f9bbeb33"}}}}
{"actor":{"display_login":"tgroh"}}