{"action":"created","comment":{"url":"https://api.github.com/repos/broadinstitute/sam/pulls/comments/228173183","pull_request_review_id":168381727,"id":228173183,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyODE3MzE4Mw==","diff_hunk":"@@ -0,0 +1,63 @@\n+package org.broadinstitute.dsde.workbench.sam.util\n+\n+import cats.effect.IO\n+import cats.kernel.Eq\n+import org.broadinstitute.dsde.workbench.google.GoogleFirestoreOpsInterpreters\n+import org.broadinstitute.dsde.workbench.model.WorkbenchException\n+import org.broadinstitute.dsde.workbench.model.google.GoogleProject\n+import org.broadinstitute.dsde.workbench.sam.Generator.genLockPath\n+import org.broadinstitute.dsde.workbench.sam.TestSupport\n+import org.broadinstitute.dsde.workbench.sam.util.DistributedLock._\n+import org.scalatest.{AsyncFlatSpec, Matchers}\n+\n+import scala.collection.JavaConverters._\n+import scala.concurrent.duration._\n+\n+class DistributedLockSpec extends AsyncFlatSpec with Matchers with TestSupport{","path":"src/test/scala/org/broadinstitute/dsde/workbench/sam/util/DistributedLockSpec.scala","position":18,"original_position":16,"commit_id":"30f1ffdecead3b7be78bb91f84848fa223530d66","original_commit_id":"cfe1be2927791d208ef6e190e61fcd3728aae612","user":{"login":"dvoet","id":1521333,"node_id":"MDQ6VXNlcjE1MjEzMzM=","avatar_url":"https://avatars0.githubusercontent.com/u/1521333?v=4","gravatar_id":"","url":"https://api.github.com/users/dvoet","html_url":"https://github.com/dvoet","followers_url":"https://api.github.com/users/dvoet/followers","following_url":"https://api.github.com/users/dvoet/following{/other_user}","gists_url":"https://api.github.com/users/dvoet/gists{/gist_id}","starred_url":"https://api.github.com/users/dvoet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvoet/subscriptions","organizations_url":"https://api.github.com/users/dvoet/orgs","repos_url":"https://api.github.com/users/dvoet/repos","events_url":"https://api.github.com/users/dvoet/events{/privacy}","received_events_url":"https://api.github.com/users/dvoet/received_events","type":"User","site_admin":false},"body":"Then that is an integration test. There should be 2 levels to the testing, is your code right and are you call google right. The former is the unit test which should have mock google. The latter is an integration test that should be written in /automation... ask @marctalbott :)","created_at":"2018-10-25T13:30:56Z","updated_at":"2018-10-25T13:30:56Z","html_url":"https://github.com/broadinstitute/sam/pull/230#discussion_r228173183","pull_request_url":"https://api.github.com/repos/broadinstitute/sam/pulls/230","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/sam/pulls/comments/228173183"},"html":{"href":"https://github.com/broadinstitute/sam/pull/230#discussion_r228173183"},"pull_request":{"href":"https://api.github.com/repos/broadinstitute/sam/pulls/230"}},"in_reply_to_id":227440586},"pull_request":{"url":"https://api.github.com/repos/broadinstitute/sam/pulls/230","id":224415516,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0NDE1NTE2","html_url":"https://github.com/broadinstitute/sam/pull/230","diff_url":"https://github.com/broadinstitute/sam/pull/230.diff","patch_url":"https://github.com/broadinstitute/sam/pull/230.patch","issue_url":"https://api.github.com/repos/broadinstitute/sam/issues/230","number":230,"state":"open","locked":false,"title":"add lock for createPetSerivceAccount","user":{"login":"Qi77Qi","id":32771737,"node_id":"MDQ6VXNlcjMyNzcxNzM3","avatar_url":"https://avatars3.githubusercontent.com/u/32771737?v=4","gravatar_id":"","url":"https://api.github.com/users/Qi77Qi","html_url":"https://github.com/Qi77Qi","followers_url":"https://api.github.com/users/Qi77Qi/followers","following_url":"https://api.github.com/users/Qi77Qi/following{/other_user}","gists_url":"https://api.github.com/users/Qi77Qi/gists{/gist_id}","starred_url":"https://api.github.com/users/Qi77Qi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Qi77Qi/subscriptions","organizations_url":"https://api.github.com/users/Qi77Qi/orgs","repos_url":"https://api.github.com/users/Qi77Qi/repos","events_url":"https://api.github.com/users/Qi77Qi/events{/privacy}","received_events_url":"https://api.github.com/users/Qi77Qi/received_events","type":"User","site_admin":false},"body":"Ticket: https://broadinstitute.atlassian.net/browse/GAWB-3859\r\nThere's no double lock, but I'm thinking maybe we can start with this before making things more complicated and see if most of the race conditions are gone in QA tests\r\n\r\nThis can't be merged yet since we need a valid project for prod to host firestore\r\n\r\nTODO: \r\n* figure out tests properly\r\n* PR firecloud-develop to add json cred in config\r\n\r\n---\r\n\r\n**PR checklist**\r\n\r\n- [ ] I've followed [the instructions](https://github.com/broadinstitute/sam/blob/develop/CONTRIBUTING.md#api-changes) if I've made any changes to the API, _especially_ if they're breaking changes\r\n- [ ] I've updated the RC_XXX release ticket with any manual steps required to release this change\r\n- [ ] I've updated the [FISMA documentation](https://github.com/broadinstitute/sam/blob/develop/CONTRIBUTING.md#fisma-documentation-changes) if I've made any security-related changes, including auth, encryption, or auditing\r\n","created_at":"2018-10-19T21:31:31Z","updated_at":"2018-10-25T13:30:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a270438ad1be59e5b1094321e06dc057589f0dc8","assignee":null,"assignees":[],"requested_reviewers":[{"login":"marctalbott","id":19961550,"node_id":"MDQ6VXNlcjE5OTYxNTUw","avatar_url":"https://avatars0.githubusercontent.com/u/19961550?v=4","gravatar_id":"","url":"https://api.github.com/users/marctalbott","html_url":"https://github.com/marctalbott","followers_url":"https://api.github.com/users/marctalbott/followers","following_url":"https://api.github.com/users/marctalbott/following{/other_user}","gists_url":"https://api.github.com/users/marctalbott/gists{/gist_id}","starred_url":"https://api.github.com/users/marctalbott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marctalbott/subscriptions","organizations_url":"https://api.github.com/users/marctalbott/orgs","repos_url":"https://api.github.com/users/marctalbott/repos","events_url":"https://api.github.com/users/marctalbott/events{/privacy}","received_events_url":"https://api.github.com/users/marctalbott/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1041638778,"node_id":"MDU6TGFiZWwxMDQxNjM4Nzc4","url":"https://api.github.com/repos/broadinstitute/sam/labels/blocked","name":"blocked","color":"d64a99","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/broadinstitute/sam/pulls/230/commits","review_comments_url":"https://api.github.com/repos/broadinstitute/sam/pulls/230/comments","review_comment_url":"https://api.github.com/repos/broadinstitute/sam/pulls/comments{/number}","comments_url":"https://api.github.com/repos/broadinstitute/sam/issues/230/comments","statuses_url":"https://api.github.com/repos/broadinstitute/sam/statuses/30f1ffdecead3b7be78bb91f84848fa223530d66","head":{"label":"broadinstitute:lock","ref":"lock","sha":"30f1ffdecead3b7be78bb91f84848fa223530d66","user":{"login":"broadinstitute","id":393552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MzU1Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/393552?v=4","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"repo":{"id":91372329,"node_id":"MDEwOlJlcG9zaXRvcnk5MTM3MjMyOQ==","name":"sam","full_name":"broadinstitute/sam","private":false,"owner":{"login":"broadinstitute","id":393552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MzU1Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/393552?v=4","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/broadinstitute/sam","description":"workbench identity and access management","fork":false,"url":"https://api.github.com/repos/broadinstitute/sam","forks_url":"https://api.github.com/repos/broadinstitute/sam/forks","keys_url":"https://api.github.com/repos/broadinstitute/sam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/sam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/sam/teams","hooks_url":"https://api.github.com/repos/broadinstitute/sam/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/sam/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/sam/events","assignees_url":"https://api.github.com/repos/broadinstitute/sam/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/sam/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/sam/tags","blobs_url":"https://api.github.com/repos/broadinstitute/sam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/sam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/sam/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/sam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/sam/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/sam/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/sam/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/sam/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/sam/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/sam/subscription","commits_url":"https://api.github.com/repos/broadinstitute/sam/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/sam/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/sam/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/sam/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/sam/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/sam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/sam/merges","archive_url":"https://api.github.com/repos/broadinstitute/sam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/sam/downloads","issues_url":"https://api.github.com/repos/broadinstitute/sam/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/sam/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/sam/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/sam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/sam/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/sam/releases{/id}","deployments_url":"https://api.github.com/repos/broadinstitute/sam/deployments","created_at":"2017-05-15T18:42:46Z","updated_at":"2018-10-25T13:17:33Z","pushed_at":"2018-10-25T13:17:33Z","git_url":"git://github.com/broadinstitute/sam.git","ssh_url":"git@github.com:broadinstitute/sam.git","clone_url":"https://github.com/broadinstitute/sam.git","svn_url":"https://github.com/broadinstitute/sam","homepage":null,"size":23012,"stargazers_count":6,"watchers_count":6,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":2,"open_issues":2,"watchers":6,"default_branch":"develop"}},"base":{"label":"broadinstitute:develop","ref":"develop","sha":"26c54368dc0b885430778f7b32fa473751116a5b","user":{"login":"broadinstitute","id":393552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MzU1Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/393552?v=4","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"repo":{"id":91372329,"node_id":"MDEwOlJlcG9zaXRvcnk5MTM3MjMyOQ==","name":"sam","full_name":"broadinstitute/sam","private":false,"owner":{"login":"broadinstitute","id":393552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MzU1Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/393552?v=4","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/broadinstitute/sam","description":"workbench identity and access management","fork":false,"url":"https://api.github.com/repos/broadinstitute/sam","forks_url":"https://api.github.com/repos/broadinstitute/sam/forks","keys_url":"https://api.github.com/repos/broadinstitute/sam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/sam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/sam/teams","hooks_url":"https://api.github.com/repos/broadinstitute/sam/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/sam/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/sam/events","assignees_url":"https://api.github.com/repos/broadinstitute/sam/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/sam/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/sam/tags","blobs_url":"https://api.github.com/repos/broadinstitute/sam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/sam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/sam/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/sam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/sam/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/sam/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/sam/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/sam/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/sam/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/sam/subscription","commits_url":"https://api.github.com/repos/broadinstitute/sam/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/sam/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/sam/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/sam/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/sam/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/sam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/sam/merges","archive_url":"https://api.github.com/repos/broadinstitute/sam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/sam/downloads","issues_url":"https://api.github.com/repos/broadinstitute/sam/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/sam/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/sam/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/sam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/sam/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/sam/releases{/id}","deployments_url":"https://api.github.com/repos/broadinstitute/sam/deployments","created_at":"2017-05-15T18:42:46Z","updated_at":"2018-10-25T13:17:33Z","pushed_at":"2018-10-25T13:17:33Z","git_url":"git://github.com/broadinstitute/sam.git","ssh_url":"git@github.com:broadinstitute/sam.git","clone_url":"https://github.com/broadinstitute/sam.git","svn_url":"https://github.com/broadinstitute/sam","homepage":null,"size":23012,"stargazers_count":6,"watchers_count":6,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":2,"open_issues":2,"watchers":6,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/sam/pulls/230"},"html":{"href":"https://github.com/broadinstitute/sam/pull/230"},"issue":{"href":"https://api.github.com/repos/broadinstitute/sam/issues/230"},"comments":{"href":"https://api.github.com/repos/broadinstitute/sam/issues/230/comments"},"review_comments":{"href":"https://api.github.com/repos/broadinstitute/sam/pulls/230/comments"},"review_comment":{"href":"https://api.github.com/repos/broadinstitute/sam/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/broadinstitute/sam/pulls/230/commits"},"statuses":{"href":"https://api.github.com/repos/broadinstitute/sam/statuses/30f1ffdecead3b7be78bb91f84848fa223530d66"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dvoet"}}