{"action":"created","comment":{"url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/comments/60058809","id":60058809,"diff_hunk":"@@ -0,0 +1,255 @@\n+package cromwell.engine.workflow\n+\n+import akka.actor.FSM.{CurrentState, SubscribeTransitionCallBack, Transition}\n+import akka.actor._\n+import akka.event.Logging\n+import com.typesafe.config.{Config, ConfigFactory}\n+import cromwell.core.WorkflowId\n+import cromwell.engine._\n+import cromwell.engine.backend._\n+import cromwell.engine.db.DataAccess._\n+import cromwell.engine.workflow.ShadowWorkflowActor._\n+import cromwell.engine.workflow.ShadowWorkflowManagerActor.AbortWorkflowCommand\n+import cromwell.engine.workflow.ShadowWorkflowManagerActor._\n+import cromwell.webservice.CromwellApiHandler._\n+import lenthall.config.ScalaConfig.EnhancedScalaConfig\n+\n+import scala.concurrent.ExecutionContext.Implicits.global\n+import scala.concurrent.duration._\n+import scala.concurrent.{Await, Future, Promise}\n+import scala.language.postfixOps\n+import scala.util.{Failure, Success}\n+\n+object ShadowWorkflowManagerActor {\n+\n+  case class WorkflowIdToActorRef(workflowId: WorkflowId, workflowActor: ActorRef)\n+\n+  sealed trait ShadowWorkflowManagerActorMessage\n+  /**\n+    * Commands\n+    */\n+  sealed trait ShadowWorkflowManagerActorCommand extends ShadowWorkflowManagerActorMessage\n+\n+  case class SubmitWorkflowCommand(source: WorkflowSourceFiles) extends ShadowWorkflowManagerActorCommand\n+  // TODO: This SubscribeToWorkflowCommand is a candidate for deletion (see the handler if you don't believe me!)","path":"engine/src/main/scala/cromwell/engine/workflow/ShadowWorkflowManagerActor.scala","position":34,"original_position":34,"commit_id":"1aa8bad416a6965a6c7025effd3f76b54de8cf7a","original_commit_id":"1aa8bad416a6965a6c7025effd3f76b54de8cf7a","user":{"login":"geoffjentry","id":961771,"avatar_url":"https://avatars.githubusercontent.com/u/961771?v=3","gravatar_id":"","url":"https://api.github.com/users/geoffjentry","html_url":"https://github.com/geoffjentry","followers_url":"https://api.github.com/users/geoffjentry/followers","following_url":"https://api.github.com/users/geoffjentry/following{/other_user}","gists_url":"https://api.github.com/users/geoffjentry/gists{/gist_id}","starred_url":"https://api.github.com/users/geoffjentry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoffjentry/subscriptions","organizations_url":"https://api.github.com/users/geoffjentry/orgs","repos_url":"https://api.github.com/users/geoffjentry/repos","events_url":"https://api.github.com/users/geoffjentry/events{/privacy}","received_events_url":"https://api.github.com/users/geoffjentry/received_events","type":"User","site_admin":false},"body":"I wouldn't worry too much about it, it's just one if those patterns I'd like people to think carefully about prior to adding to the mayhem. Otoh if you see an easy way to avoid it go for it","created_at":"2016-04-18T13:38:55Z","updated_at":"2016-04-18T13:38:55Z","html_url":"https://github.com/broadinstitute/cromwell/pull/707#discussion_r60058809","pull_request_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/707","_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/comments/60058809"},"html":{"href":"https://github.com/broadinstitute/cromwell/pull/707#discussion_r60058809"},"pull_request":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/707"}}},"pull_request":{"url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/707","id":66561043,"html_url":"https://github.com/broadinstitute/cromwell/pull/707","diff_url":"https://github.com/broadinstitute/cromwell/pull/707.diff","patch_url":"https://github.com/broadinstitute/cromwell/pull/707.patch","issue_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/707","number":707,"state":"open","locked":false,"title":"Processing messages in the Shadow Hierarchy. Closes #692. Closes #648.","user":{"login":"cjllanwarne","id":13006282,"avatar_url":"https://avatars.githubusercontent.com/u/13006282?v=3","gravatar_id":"","url":"https://api.github.com/users/cjllanwarne","html_url":"https://github.com/cjllanwarne","followers_url":"https://api.github.com/users/cjllanwarne/followers","following_url":"https://api.github.com/users/cjllanwarne/following{/other_user}","gists_url":"https://api.github.com/users/cjllanwarne/gists{/gist_id}","starred_url":"https://api.github.com/users/cjllanwarne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjllanwarne/subscriptions","organizations_url":"https://api.github.com/users/cjllanwarne/orgs","repos_url":"https://api.github.com/users/cjllanwarne/repos","events_url":"https://api.github.com/users/cjllanwarne/events{/privacy}","received_events_url":"https://api.github.com/users/cjllanwarne/received_events","type":"User","site_admin":false},"body":"To set expectations, this PR sets up shadow mode to actually process messages through the new set of lifecycle actors. It can be seen that submissions return an ID and make it through the `MaterializeWorkflowDescriptor` phase. However not the `Initialize` phase. This is all done in a shadow hierarchy which has not affected the normal operation yet...\r\n\r\nWe still need:\r\n* The part which assigns backends to calls (currently blocked out to happen in `ShadowMaterializeWorkflowDescriptorActor`)\r\n* The part which generates actors from backend name strings (blocked out at the bottom of both the `InitializeWorkflowActor` and `FinalizeWorkflowActor`)\r\n* The entire `WorkflowExecutionActor`\r\n\r\nIf you try to run anything in shadow mode, it'll fail in the `InitializeWorkflow` phase with an exception saying that no backend assignments were found.","created_at":"2016-04-14T21:59:09Z","updated_at":"2016-04-18T13:38:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9a346dfe75c30257b4e3fad2ae4c2fd754d03ff2","assignee":{"login":"gauravs90","id":13227423,"avatar_url":"https://avatars.githubusercontent.com/u/13227423?v=3","gravatar_id":"","url":"https://api.github.com/users/gauravs90","html_url":"https://github.com/gauravs90","followers_url":"https://api.github.com/users/gauravs90/followers","following_url":"https://api.github.com/users/gauravs90/following{/other_user}","gists_url":"https://api.github.com/users/gauravs90/gists{/gist_id}","starred_url":"https://api.github.com/users/gauravs90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gauravs90/subscriptions","organizations_url":"https://api.github.com/users/gauravs90/orgs","repos_url":"https://api.github.com/users/gauravs90/repos","events_url":"https://api.github.com/users/gauravs90/events{/privacy}","received_events_url":"https://api.github.com/users/gauravs90/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/707/commits","review_comments_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/707/comments","review_comment_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/comments{/number}","comments_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/707/comments","statuses_url":"https://api.github.com/repos/broadinstitute/cromwell/statuses/1aa8bad416a6965a6c7025effd3f76b54de8cf7a","head":{"label":"broadinstitute:cjl_dummyBackend","ref":"cjl_dummyBackend","sha":"1aa8bad416a6965a6c7025effd3f76b54de8cf7a","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":34136406,"name":"cromwell","full_name":"broadinstitute/cromwell","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/cromwell","description":"Workflow Execution Engine using WDL","fork":false,"url":"https://api.github.com/repos/broadinstitute/cromwell","forks_url":"https://api.github.com/repos/broadinstitute/cromwell/forks","keys_url":"https://api.github.com/repos/broadinstitute/cromwell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/cromwell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/cromwell/teams","hooks_url":"https://api.github.com/repos/broadinstitute/cromwell/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/cromwell/events","assignees_url":"https://api.github.com/repos/broadinstitute/cromwell/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/cromwell/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/cromwell/tags","blobs_url":"https://api.github.com/repos/broadinstitute/cromwell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/cromwell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/cromwell/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/cromwell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/cromwell/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/cromwell/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/cromwell/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/cromwell/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/cromwell/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/cromwell/subscription","commits_url":"https://api.github.com/repos/broadinstitute/cromwell/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/cromwell/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/cromwell/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/cromwell/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/cromwell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/cromwell/merges","archive_url":"https://api.github.com/repos/broadinstitute/cromwell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/cromwell/downloads","issues_url":"https://api.github.com/repos/broadinstitute/cromwell/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/cromwell/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/cromwell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/cromwell/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/cromwell/releases{/id}","deployments_url":"https://api.github.com/repos/broadinstitute/cromwell/deployments","created_at":"2015-04-17T19:39:36Z","updated_at":"2016-04-17T01:40:19Z","pushed_at":"2016-04-17T00:34:09Z","git_url":"git://github.com/broadinstitute/cromwell.git","ssh_url":"git@github.com:broadinstitute/cromwell.git","clone_url":"https://github.com/broadinstitute/cromwell.git","svn_url":"https://github.com/broadinstitute/cromwell","homepage":"","size":6325,"stargazers_count":54,"watchers_count":54,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":14,"mirror_url":null,"open_issues_count":84,"forks":14,"open_issues":84,"watchers":54,"default_branch":"develop"}},"base":{"label":"broadinstitute:develop","ref":"develop","sha":"9f759a54a0b8873f1338f36391f985477d83475a","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":34136406,"name":"cromwell","full_name":"broadinstitute/cromwell","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/cromwell","description":"Workflow Execution Engine using WDL","fork":false,"url":"https://api.github.com/repos/broadinstitute/cromwell","forks_url":"https://api.github.com/repos/broadinstitute/cromwell/forks","keys_url":"https://api.github.com/repos/broadinstitute/cromwell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/cromwell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/cromwell/teams","hooks_url":"https://api.github.com/repos/broadinstitute/cromwell/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/cromwell/events","assignees_url":"https://api.github.com/repos/broadinstitute/cromwell/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/cromwell/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/cromwell/tags","blobs_url":"https://api.github.com/repos/broadinstitute/cromwell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/cromwell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/cromwell/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/cromwell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/cromwell/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/cromwell/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/cromwell/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/cromwell/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/cromwell/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/cromwell/subscription","commits_url":"https://api.github.com/repos/broadinstitute/cromwell/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/cromwell/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/cromwell/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/cromwell/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/cromwell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/cromwell/merges","archive_url":"https://api.github.com/repos/broadinstitute/cromwell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/cromwell/downloads","issues_url":"https://api.github.com/repos/broadinstitute/cromwell/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/cromwell/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/cromwell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/cromwell/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/cromwell/releases{/id}","deployments_url":"https://api.github.com/repos/broadinstitute/cromwell/deployments","created_at":"2015-04-17T19:39:36Z","updated_at":"2016-04-17T01:40:19Z","pushed_at":"2016-04-17T00:34:09Z","git_url":"git://github.com/broadinstitute/cromwell.git","ssh_url":"git@github.com:broadinstitute/cromwell.git","clone_url":"https://github.com/broadinstitute/cromwell.git","svn_url":"https://github.com/broadinstitute/cromwell","homepage":"","size":6325,"stargazers_count":54,"watchers_count":54,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":14,"mirror_url":null,"open_issues_count":84,"forks":14,"open_issues":84,"watchers":54,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/707"},"html":{"href":"https://github.com/broadinstitute/cromwell/pull/707"},"issue":{"href":"https://api.github.com/repos/broadinstitute/cromwell/issues/707"},"comments":{"href":"https://api.github.com/repos/broadinstitute/cromwell/issues/707/comments"},"review_comments":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/707/comments"},"review_comment":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/707/commits"},"statuses":{"href":"https://api.github.com/repos/broadinstitute/cromwell/statuses/1aa8bad416a6965a6c7025effd3f76b54de8cf7a"}}}}