dockstore / dockstore

Our VM/Docker sharing infrastructure and management component
https://dockstore.org/
Apache License 2.0
116 stars 27 forks source link

CLI: WES always assumes that WDL workflows are version "1.0" #5393

Open fhembroff opened 1 year ago

fhembroff commented 1 year ago

Describe the bug Currently, we are unable to run WDL workflows that are not version "1.0" through WES on the CLI.

This is because we specify what version of WDL we are using for WES here, however, we have set the variable to be always equal to "1.0" here, here and here.

This means that any WDL workflow that is not version "1.0" will not run through WES. If a WDL workflow is the wrong version, we see an error that looks like this (found by going through the agc logs),

escriptorState): cromwell.engine.workflow.lifecycle.materialization.MaterializeWorkflowDescriptorActor$$anon$1: Workflow input processing failed:
Unrecognized token on line 1, column 1:

task md5 {
^
        at cromwell.engine.workflow.lifecycle.materialization.MaterializeWorkflowDescriptorActor.cromwell$engine$workflow$lifecycle$materialization$MaterializeWorkflowDescriptorActor$$workflowInitializationFailed(MaterializeWorkflowDescriptorActor.scala:257)
        at cromwell.engine.workflow.lifecycle.materialization.MaterializeWorkflowDescriptorActor$$anonfun$2.applyOrElse(MaterializeWorkflowDescriptorActor.scala:227)
        at cromwell.engine.workflow.lifecycle.materialization.MaterializeWorkflowDescriptorActor$$anonfun$2.applyOrElse(MaterializeWorkflowDescriptorActor.scala:222)
        at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:38)
        at akka.actor.FSM.processEvent(FSM.scala:707)
        at akka.actor.FSM.processEvent$(FSM.scala:704)
        at cromwell.engine.workflow.lifecycle.materialization.MaterializeWorkflowDescriptorActor.akka$actor$LoggingFSM$$super$processEvent(MaterializeWorkflowDescriptorActor.scala:169)
        at akka.actor.LoggingFSM.processEvent(FSM.scala:847)
        at akka.actor.LoggingFSM.processEvent$(FSM.scala:829)
        at cromwell.engine.workflow.lifecycle.materialization.MaterializeWorkflowDescriptorActor.processEvent(MaterializeWorkflowDescriptorActor.scala:169)
        at akka.actor.FSM.akka$actor$FSM$$processMsg(FSM.scala:701)
        at akka.actor.FSM$$anonfun$receive$1.applyOrElse(FSM.scala:695)
        at akka.actor.Actor.aroundReceive(Actor.scala:539)
        at akka.actor.Actor.aroundReceive$(Actor.scala:537)
        at cromwell.engine.workflow.lifecycle.materialization.MaterializeWorkflowDescriptorActor.aroundReceive(MaterializeWorkflowDescriptorActor.scala:169)
        at akka.actor.ActorCell.receiveMessage(ActorCell.scala:614)
        at akka.actor.ActorCell.invoke(ActorCell.scala:583)
        at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:268)
        at akka.dispatch.Mailbox.run(Mailbox.scala:229)
        at akka.dispatch.Mailbox.exec(Mailbox.scala:241)
        at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
        at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
        at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

Wed, 01 Mar 2023 18:31:44 -0500 2023-03-01 23:31:44,414 cromwell-system-akka.dispatchers.engine-dispatcher-24 INFO  - WorkflowManagerActor: Workflow actor for 43202783-9e73-496d-aa7a-63446f56bfd5 completed with status 'Failed'. The workflow will be removed from the workflow store.

To Reproduce Steps to reproduce the behavior: Attempt to launch this workflow on AGC using the provided commands.

Expected behavior The CLI should be able to run all WDL versions (particularly version draft-2, as it is used a lot on dockstore.org).

Additional context CLI VERSION: 1.13.1

I also found that if modify this line to draft-2 the workflow in the "To reproduce" section will work.

┆Issue is synchronized with this Jira Story ┆Fix Versions: Dockstore 2.X ┆Issue Number: DOCK-2334 ┆Sprint: Backlog ┆Issue Type: Story

fhembroff commented 1 year ago

I think this should be fairly easy to correct.

I think all you would have to do is check the WDL file for something that looks like version: X and if it doesn't exist, the WDL is version draft-2, and if it does you just return whatever X is.

coverbeck commented 1 year ago

There's code in the web service that gets the version of a WDL file. It would be good to reuse that, although that code is currently not accessible by the CLI.

unito-bot commented 1 year ago

➤ Charles Overbeck commented:

Cromwell does not support 1.1, so that doesn’t matter.

Miniwdl does, but miniwdl doesn’t work with AGC/Dockstore CLI.

We don’t know how Cromwell reacts to 1.1, but AGC checks that the command-line version switch matches the descriptor version.

unito-bot commented 1 month ago

➤ Charles Overbeck commented:

Could be an issue for eLwazi, but we’ll re-prioritize if that comes up.