{"action":"created","comment":{"url":"https://api.github.com/repos/broadinstitute/rawls/pulls/comments/53708544","id":53708544,"diff_hunk":"@@ -38,6 +39,63 @@ class GraphWorkspaceDAOSpec extends FlatSpec with Matchers with OrientDbTestFixt\n     }\n   }\n \n+  it should \"save a new workspace with a realm\" in withDefaultTestDatabase { dataSource =>\n+    dataSource.inTransaction() { txn =>\n+      val user = RawlsUser(RawlsUserSubjectId(\"user@secret.com\"), RawlsUserEmail(\"user@secret.com\"))\n+      authDAO.saveUser(user, txn)\n+      val secretGroup = makeRawlsGroup(\"SecretRealm\", Set(user), Set.empty)\n+      authDAO.saveGroup(secretGroup, txn)\n+      val secretGroupRef = RawlsGroupRef(groupName = secretGroup.groupName)\n+      val secretWorkspace = Workspace(\n+        namespace = testData.wsName.namespace,\n+        name = testData.wsName.name,\n+        realm = Some(secretGroupRef),\n+        workspaceId = \"aWorkspaceId\",\n+        bucketName = \"aBucket\",\n+        createdDate = testDate,\n+        lastModified = testDate,\n+        createdBy = \"Secret User\",\n+        attributes = Map(\"workspace_attrib\" -> AttributeString(\"foo\")),\n+        accessLevels = Map.empty\n+      )\n+      workspaceDAO.save(secretWorkspace, txn)\n+      val savedWorkspace = workspaceDAO.findById(secretWorkspace.workspaceId, txn).get.workspace\n+      assert {","path":"src/test/scala/org/broadinstitute/dsde/rawls/dataaccess/GraphWorkspaceDAOSpec.scala","position":33,"original_position":33,"commit_id":"3ed0cc66d0b5466de53433bfd93286a2c919bfa9","original_commit_id":"3ed0cc66d0b5466de53433bfd93286a2c919bfa9","user":{"login":"rushtong","id":116679,"avatar_url":"https://avatars.githubusercontent.com/u/116679?v=3","gravatar_id":"","url":"https://api.github.com/users/rushtong","html_url":"https://github.com/rushtong","followers_url":"https://api.github.com/users/rushtong/followers","following_url":"https://api.github.com/users/rushtong/following{/other_user}","gists_url":"https://api.github.com/users/rushtong/gists{/gist_id}","starred_url":"https://api.github.com/users/rushtong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rushtong/subscriptions","organizations_url":"https://api.github.com/users/rushtong/orgs","repos_url":"https://api.github.com/users/rushtong/repos","events_url":"https://api.github.com/users/rushtong/events{/privacy}","received_events_url":"https://api.github.com/users/rushtong/received_events","type":"User","site_admin":false},"body":"@jmthibault79 - Yeah, that fails. Here is the stack in case you are interested. Notice that the last modified date is milliseconds different.\r\n\r\n```\r\n[info] - should save a new workspace with a realm *** FAILED ***\r\n[info]   Expected Workspace(myNamespace,myWorkspace,Some(RawlsGroupRef(RawlsGroupName(SecretRealm))),aWorkspaceId,aBucket,2016-02-22T17:55:25.354-05:00,2016-02-22T17:55:25.354-05:00,Secret User,Map(workspace_attrib -> AttributeString(foo)),Map(),false), but got Workspace(myNamespace,myWorkspace,Some(RawlsGroupRef(RawlsGroupName(SecretRealm))),aWorkspaceId,aBucket,2016-02-22T17:55:25.354-05:00,2016-02-22T17:55:28.796-05:00,Secret User,Map(workspace_attrib -> AttributeString(foo)),Map(),false) (GraphWorkspaceDAOSpec.scala:63)\r\n```","created_at":"2016-02-22T22:57:44Z","updated_at":"2016-02-22T22:57:44Z","html_url":"https://github.com/broadinstitute/rawls/pull/308#discussion_r53708544","pull_request_url":"https://api.github.com/repos/broadinstitute/rawls/pulls/308","_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/rawls/pulls/comments/53708544"},"html":{"href":"https://github.com/broadinstitute/rawls/pull/308#discussion_r53708544"},"pull_request":{"href":"https://api.github.com/repos/broadinstitute/rawls/pulls/308"}}},"pull_request":{"url":"https://api.github.com/repos/broadinstitute/rawls/pulls/308","id":60255072,"html_url":"https://github.com/broadinstitute/rawls/pull/308","diff_url":"https://github.com/broadinstitute/rawls/pull/308.diff","patch_url":"https://github.com/broadinstitute/rawls/pull/308.patch","issue_url":"https://api.github.com/repos/broadinstitute/rawls/issues/308","number":308,"state":"open","locked":false,"title":"Add realm to the workspace api.","user":{"login":"rushtong","id":116679,"avatar_url":"https://avatars.githubusercontent.com/u/116679?v=3","gravatar_id":"","url":"https://api.github.com/users/rushtong","html_url":"https://github.com/rushtong","followers_url":"https://api.github.com/users/rushtong/followers","following_url":"https://api.github.com/users/rushtong/following{/other_user}","gists_url":"https://api.github.com/users/rushtong/gists{/gist_id}","starred_url":"https://api.github.com/users/rushtong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rushtong/subscriptions","organizations_url":"https://api.github.com/users/rushtong/orgs","repos_url":"https://api.github.com/users/rushtong/repos","events_url":"https://api.github.com/users/rushtong/events{/privacy}","received_events_url":"https://api.github.com/users/rushtong/received_events","type":"User","site_admin":false},"body":"This PR for GAWB-285 merely adds a realm to the API and persists it. \r\nImplementation of the realm semantics with respect to ACLs is for GAWB-289. \r\nThis task is necessary for UI work to proceed without causing errors.\r\nOriginally submitted against develop, but we are now working off of a separate feature branch for this epic.\r\n\r\n- [x] **Submitter**: Rebase to develop. DO NOT SQUASH\r\n- [x] **Submitter**: Make sure Swagger is updated if API changes\r\n- [x] **Submitter**: Make sure documentation for code is complete\r\n- [x] **Submitter**: Review code comments; remove done TODOs, create stories for remaining TODOs\r\n- [x] **Submitter**: Include the JIRA issue number in the PR description\r\n- [x] **Submitter**: Add description or comments on the PR explaining the hows/whys (if not obvious)\r\n- [x] Tell ![](http://i.imgur.com/9dLzbPd.png) that the PR exists if he wants to look at it\r\n- [x] Anoint a lead reviewer (LR). **Assign PR to LR**\r\n- [x] **LR**: Initial review by LR and others.\r\n- [x] Comment / review / update cycle:\r\n  * Rest of team may comments on PR at will\r\n  * **LR assigns to submitter** for feedback fixes\r\n  * Submitter updates documentation as needed\r\n  * Submitter rebases to develop again if necessary\r\n  * Submitter makes further commits. DO NOT SQUASH. **Reassign to LR** for further feedback\r\n- [x] ![](http://i.imgur.com/9dLzbPd.png) sign off\r\n- [x] **LR** sign off\r\n- [x] **Assign to submitter** to finalize\r\n- [x] **Submitter**: Squash commits, rebase if necessary\r\n- [x] **Submitter**: Verify all tests go green, including CI tests\r\n- [ ] **Submitter**: Merge to realm \r\n- [ ] **Submitter**: Delete branch after merge\r\n- [x] **Submitter**: Check configuration files in Jenkins in case they need changes\r\n- [ ] **Submitter**: Verify swagger UI on dev server still works after deployment\r\n- [ ] **Submitter**: Inform other teams of any API changes via hipchat and/or email\r\n- [ ] **Submitter**: Mark JIRA issue as resolved once this checklist is completed","created_at":"2016-02-22T22:44:49Z","updated_at":"2016-02-22T22:57:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"465a979d2c66d8f02c12646baefb3266a040ef92","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/broadinstitute/rawls/pulls/308/commits","review_comments_url":"https://api.github.com/repos/broadinstitute/rawls/pulls/308/comments","review_comment_url":"https://api.github.com/repos/broadinstitute/rawls/pulls/comments{/number}","comments_url":"https://api.github.com/repos/broadinstitute/rawls/issues/308/comments","statuses_url":"https://api.github.com/repos/broadinstitute/rawls/statuses/3ed0cc66d0b5466de53433bfd93286a2c919bfa9","head":{"label":"broadinstitute:gr-GAWB-285","ref":"gr-GAWB-285","sha":"3ed0cc66d0b5466de53433bfd93286a2c919bfa9","user":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","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":34129770,"name":"rawls","full_name":"broadinstitute/rawls","owner":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","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},"private":false,"html_url":"https://github.com/broadinstitute/rawls","description":"Rawls service for DSDE","fork":false,"url":"https://api.github.com/repos/broadinstitute/rawls","forks_url":"https://api.github.com/repos/broadinstitute/rawls/forks","keys_url":"https://api.github.com/repos/broadinstitute/rawls/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/rawls/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/rawls/teams","hooks_url":"https://api.github.com/repos/broadinstitute/rawls/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/rawls/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/rawls/events","assignees_url":"https://api.github.com/repos/broadinstitute/rawls/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/rawls/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/rawls/tags","blobs_url":"https://api.github.com/repos/broadinstitute/rawls/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/rawls/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/rawls/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/rawls/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/rawls/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/rawls/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/rawls/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/rawls/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/rawls/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/rawls/subscription","commits_url":"https://api.github.com/repos/broadinstitute/rawls/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/rawls/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/rawls/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/rawls/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/rawls/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/rawls/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/rawls/merges","archive_url":"https://api.github.com/repos/broadinstitute/rawls/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/rawls/downloads","issues_url":"https://api.github.com/repos/broadinstitute/rawls/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/rawls/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/rawls/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/rawls/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/rawls/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/rawls/releases{/id}","deployments_url":"https://api.github.com/repos/broadinstitute/rawls/deployments","created_at":"2015-04-17T17:16:07Z","updated_at":"2016-01-11T17:54:05Z","pushed_at":"2016-02-22T22:44:49Z","git_url":"git://github.com/broadinstitute/rawls.git","ssh_url":"git@github.com:broadinstitute/rawls.git","clone_url":"https://github.com/broadinstitute/rawls.git","svn_url":"https://github.com/broadinstitute/rawls","homepage":null,"size":3145,"stargazers_count":4,"watchers_count":4,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":4,"default_branch":"develop"}},"base":{"label":"broadinstitute:realm","ref":"realm","sha":"7c07809f4c7be9dae00946e3591afacc071e51bc","user":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","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":34129770,"name":"rawls","full_name":"broadinstitute/rawls","owner":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","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},"private":false,"html_url":"https://github.com/broadinstitute/rawls","description":"Rawls service for DSDE","fork":false,"url":"https://api.github.com/repos/broadinstitute/rawls","forks_url":"https://api.github.com/repos/broadinstitute/rawls/forks","keys_url":"https://api.github.com/repos/broadinstitute/rawls/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/rawls/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/rawls/teams","hooks_url":"https://api.github.com/repos/broadinstitute/rawls/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/rawls/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/rawls/events","assignees_url":"https://api.github.com/repos/broadinstitute/rawls/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/rawls/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/rawls/tags","blobs_url":"https://api.github.com/repos/broadinstitute/rawls/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/rawls/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/rawls/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/rawls/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/rawls/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/rawls/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/rawls/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/rawls/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/rawls/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/rawls/subscription","commits_url":"https://api.github.com/repos/broadinstitute/rawls/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/rawls/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/rawls/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/rawls/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/rawls/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/rawls/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/rawls/merges","archive_url":"https://api.github.com/repos/broadinstitute/rawls/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/rawls/downloads","issues_url":"https://api.github.com/repos/broadinstitute/rawls/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/rawls/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/rawls/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/rawls/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/rawls/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/rawls/releases{/id}","deployments_url":"https://api.github.com/repos/broadinstitute/rawls/deployments","created_at":"2015-04-17T17:16:07Z","updated_at":"2016-01-11T17:54:05Z","pushed_at":"2016-02-22T22:44:49Z","git_url":"git://github.com/broadinstitute/rawls.git","ssh_url":"git@github.com:broadinstitute/rawls.git","clone_url":"https://github.com/broadinstitute/rawls.git","svn_url":"https://github.com/broadinstitute/rawls","homepage":null,"size":3145,"stargazers_count":4,"watchers_count":4,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":4,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/rawls/pulls/308"},"html":{"href":"https://github.com/broadinstitute/rawls/pull/308"},"issue":{"href":"https://api.github.com/repos/broadinstitute/rawls/issues/308"},"comments":{"href":"https://api.github.com/repos/broadinstitute/rawls/issues/308/comments"},"review_comments":{"href":"https://api.github.com/repos/broadinstitute/rawls/pulls/308/comments"},"review_comment":{"href":"https://api.github.com/repos/broadinstitute/rawls/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/broadinstitute/rawls/pulls/308/commits"},"statuses":{"href":"https://api.github.com/repos/broadinstitute/rawls/statuses/3ed0cc66d0b5466de53433bfd93286a2c919bfa9"}}}}