Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@fhembroff
Copy link
Contributor

@fhembroff fhembroff commented Feb 15, 2023

Description
Currently, the CLI does not accept WDL workflows that do not contain task, command, or output in the --entry file. However, it is possible to have a valid WDL workflow that does not contain these fields, through the use of sub-workflows, an example given here.

To fix this, I have modified the method WDLClient.check(file) such that it only sends an error message if either workflow or call are not found in the --entry file and it gives a warning to the user if the --entry is missing task, command, or output.

I am giving the warning as if the WDL is invalid, when it is launched, it will give the user a lot of error messages, but many of them are confusing, particularly if it is for a simple mistake such as forgetting to specify a task.

The warning message looks like this, WARNING: these fields are missing from WDL file, this could be causing errors: 'task' 'command' 'output''.

*The method WDLClient.check(file) is not necessarily required, as if the files are invalid, error messages will be given when the tool is launched, but these messages can be very confusing.

Review Instructions
Ensure that workflows such as the one specified in this discourse discussion are able to be run on the dockstore-cli.

This feature can be checked with dockstore tool launch --entry [FILE PATH] --json [JSON PATH].

Issue
DOCK-2245
dockstore/dockstore#5133

Security
If there are any concerns that require extra attention from the security team, highlight them here.

Please make sure that you've checked the following before submitting your pull request. Thanks!

  • Check that you pass the basic style checks and unit tests by running ./mvnw clean install
  • If this PR is for a user-facing feature, create and link a documentation ticket for this feature (usually in the same milestone as the linked issue). Style points if you create a documentation PR directly and link that instead.

@fhembroff fhembroff self-assigned this Feb 15, 2023
@codecov
Copy link

codecov bot commented Feb 15, 2023

Codecov Report

Base: 69.73% // Head: 69.51% // Decreases project coverage by -0.23% ⚠️

Coverage data is based on head (3c64638) compared to base (9dbf999).
Patch coverage: 82.60% of modified lines in pull request are covered.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #225      +/-   ##
=============================================
- Coverage      69.73%   69.51%   -0.23%     
+ Complexity      1076     1058      -18     
=============================================
  Files             47       47              
  Lines           6050     6062      +12     
  Branches         796      801       +5     
=============================================
- Hits            4219     4214       -5     
- Misses          1510     1511       +1     
- Partials         321      337      +16     
Flag Coverage Δ
bitbuckettests 9.91% <0.00%> (-0.02%) ⬇️
confidentialtooltests 54.38% <8.69%> (-0.49%) ⬇️
confidentialworkflowtests 27.76% <0.00%> (-0.11%) ⬇️
nonconfidentialtests 32.53% <82.60%> (+0.06%) ⬆️
singularitytests 16.66% <0.00%> (-0.04%) ⬇️
unittests 8.36% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...in/java/io/github/collaboratory/wdl/WDLClient.java 78.76% <82.60%> (-1.44%) ⬇️
...ckstore/client/cli/nested/AbstractEntryClient.java 74.36% <0.00%> (-0.69%) ⬇️
...ockstore/client/cli/nested/BaseLanguageClient.java 57.83% <0.00%> (-0.61%) ⬇️
...ain/java/io/dockstore/common/FileProvisioning.java 70.24% <0.00%> (-0.31%) ⬇️
...ava/io/dockstore/client/cli/nested/ToolClient.java 72.38% <0.00%> (-0.27%) ⬇️
.../src/main/java/io/dockstore/client/cli/Client.java 50.00% <0.00%> (-0.25%) ⬇️
...in/java/io/github/collaboratory/cwl/CWLClient.java 80.24% <0.00%> (-0.18%) ⬇️
...io/dockstore/client/cli/nested/WorkflowClient.java 71.53% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@fhembroff
Copy link
Contributor Author

What the output looks like when a valid workflow is given (that is missing task command output), (observe the first line)

> java -jar ~/Documents/work/incorrect-wdl-validation/dockstore-cli/dockstore-client/target/dockstore-client-1.14.0-SNAPSHOT-shaded.jar tool launch --local-entry hello-workflow.wdl --json hello-workflow.json 
WARNING: these fields are missing from WDL file, this could be causing errors: 'task' 'command' 'output'
Created temporary working directory at '/tmp/1676499109584-0'
Using local file 'hello-workflow.wdl' as primary descriptor
Creating directories for run of Dockstore launcher in current working directory: /home/fhembroff/Documents/work/incorrect-wdl-validation/learn-wdl/1_script_examples/1_hello_worlds/7_subworkflow
Provisioning your input files to your local machine
Calling out to Cromwell to run your workflow
Executing: java -jar /home/fhembroff/.dockstore/libraries/cromwell-84.jar run --inputs /tmp/foo10381779181985756903json /home/fhembroff/Documents/work/incorrect-wdl-validation/learn-wdl/1_script_examples/1_hello_worlds/7_subworkflow/hello-workflow.wdl
[2023-02-15 17:11:51,44] [info] Running with database db.url = jdbc:hsqldb:mem:7ba29c61-823c-4132-8846-7e1315594a02;shutdown=false;hsqldb.tx=mvcc
[2023-02-15 17:11:53,70] [info] Running migration RenameWorkflowOptionsInMetadata with a read batch size of 100000 and a write batch size of 100000
[2023-02-15 17:11:53,71] [info] [RenameWorkflowOptionsInMetadata] 100%
[2023-02-15 17:11:53,92] [info] Running with database db.url = jdbc:hsqldb:mem:2e54410c-5827-4e56-9f82-9117d74ed345;shutdown=false;hsqldb.tx=mvcc
[2023-02-15 17:11:54,33] [info] Slf4jLogger started
[2023-02-15 17:11:54,48] [info] Workflow heartbeat configuration:
{
  "cromwellId" : "cromid-536ac8c",
  "heartbeatInterval" : "2 minutes",
  "ttl" : "10 minutes",
  "failureShutdownDuration" : "5 minutes",
  "writeBatchSize" : 10000,
  "writeThreshold" : 10000
}
[2023-02-15 17:11:54,52] [info] Metadata summary refreshing every 1 second.
[2023-02-15 17:11:54,53] [info] No metadata archiver defined in config
[2023-02-15 17:11:54,53] [info] No metadata deleter defined in config
[2023-02-15 17:11:54,53] [info] KvWriteActor configured to flush with batch size 200 and process rate 5 seconds.
[2023-02-15 17:11:54,53] [info] WriteMetadataActor configured to flush with batch size 200 and process rate 5 seconds.
[2023-02-15 17:11:54,54] [info] CallCacheWriteActor configured to flush with batch size 100 and process rate 3 seconds.
[2023-02-15 17:11:54,60] [info] JobRestartCheckTokenDispenser - Distribution rate: 50 per 1 seconds.
[2023-02-15 17:11:54,62] [info] JobExecutionTokenDispenser - Distribution rate: 20 per 10 seconds.
[2023-02-15 17:11:54,68] [info] SingleWorkflowRunnerActor: Version 84
[2023-02-15 17:11:54,69] [info] SingleWorkflowRunnerActor: Submitting workflow
[2023-02-15 17:11:54,72] [info] Unspecified type (Unspecified version) workflow 6c6b7748-ec70-4511-9ead-ae91c8929831 submitted
[2023-02-15 17:11:54,73] [info] SingleWorkflowRunnerActor: Workflow submitted 6c6b7748-ec70-4511-9ead-ae91c8929831
[2023-02-15 17:11:54,73] [info] 1 new workflows fetched by cromid-536ac8c: 6c6b7748-ec70-4511-9ead-ae91c8929831
[2023-02-15 17:11:54,74] [info] WorkflowManagerActor: Starting workflow 6c6b7748-ec70-4511-9ead-ae91c8929831
[2023-02-15 17:11:54,75] [info] WorkflowManagerActor: Successfully started WorkflowActor-6c6b7748-ec70-4511-9ead-ae91c8929831
[2023-02-15 17:11:54,75] [info] Retrieved 1 workflows from the WorkflowStoreActor
[2023-02-15 17:11:54,77] [info] WorkflowStoreHeartbeatWriteActor configured to flush with batch size 10000 and process rate 2 minutes.
[2023-02-15 17:11:54,83] [info] MaterializeWorkflowDescriptorActor [6c6b7748]: Parsing workflow as WDL 1.0
[2023-02-15 17:11:55,23] [info] MaterializeWorkflowDescriptorActor [6c6b7748]: Call-to-Backend assignments: HelloWorld.WriteGreeting -> Local
[2023-02-15 17:11:57,49] [info] WorkflowExecutionActor-6c6b7748-ec70-4511-9ead-ae91c8929831 [6c6b7748]: Starting HelloWorld.WriteGreeting
[2023-02-15 17:11:59,61] [info] Not triggering log of restart checking token queue status. Effective log interval = None
[2023-02-15 17:11:59,64] [info] Not triggering log of execution token queue status. Effective log interval = None
[2023-02-15 17:12:04,66] [info] Assigned new job execution tokens to the following groups: 6c6b7748: 1
[2023-02-15 17:12:04,78] [info] BackgroundConfigAsyncJobExecutionActor [6c6b7748HelloWorld.WriteGreeting:NA:1]: echo 'hello Hello subworkflow!'
[2023-02-15 17:12:04,83] [info] BackgroundConfigAsyncJobExecutionActor [6c6b7748HelloWorld.WriteGreeting:NA:1]: executing: /bin/bash /tmp/1676499109584-0/cromwell-executions/HelloWorld/6c6b7748-ec70-4511-9ead-ae91c8929831/call-WriteGreeting/execution/script
[2023-02-15 17:12:09,58] [info] BackgroundConfigAsyncJobExecutionActor [6c6b7748HelloWorld.WriteGreeting:NA:1]: job id: 30983
[2023-02-15 17:12:09,58] [info] BackgroundConfigAsyncJobExecutionActor [6c6b7748HelloWorld.WriteGreeting:NA:1]: Status change from - to Done
[2023-02-15 17:12:09,80] [info] WorkflowExecutionActor-6c6b7748-ec70-4511-9ead-ae91c8929831 [6c6b7748]: Workflow HelloWorld complete. Final Outputs:
{
  "HelloWorld.WriteGreeting.response": "/tmp/1676499109584-0/cromwell-executions/HelloWorld/6c6b7748-ec70-4511-9ead-ae91c8929831/call-WriteGreeting/execution/stdout"
}
[2023-02-15 17:12:14,59] [info] WorkflowManagerActor: Workflow actor for 6c6b7748-ec70-4511-9ead-ae91c8929831 completed with status 'Succeeded'. The workflow will be removed from the workflow store.
[2023-02-15 17:12:18,52] [info] SingleWorkflowRunnerActor workflow finished with status 'Succeeded'.
{
  "outputs": {
    "HelloWorld.WriteGreeting.response": "/tmp/1676499109584-0/cromwell-executions/HelloWorld/6c6b7748-ec70-4511-9ead-ae91c8929831/call-WriteGreeting/execution/stdout"
  },
  "id": "6c6b7748-ec70-4511-9ead-ae91c8929831"
}
[2023-02-15 17:12:19,57] [info] Workflow polling stopped
[2023-02-15 17:12:19,58] [info] 0 workflows released by cromid-536ac8c
[2023-02-15 17:12:19,58] [info] Shutting down WorkflowStoreActor - Timeout = 5 seconds
[2023-02-15 17:12:19,59] [info] Shutting down WorkflowLogCopyRouter - Timeout = 5 seconds
[2023-02-15 17:12:19,59] [info] Shutting down JobExecutionTokenDispenser - Timeout = 5 seconds
[2023-02-15 17:12:19,59] [info] Aborting all running workflows.
[2023-02-15 17:12:19,59] [info] JobExecutionTokenDispenser stopped
[2023-02-15 17:12:19,59] [info] WorkflowStoreActor stopped
[2023-02-15 17:12:19,59] [info] WorkflowLogCopyRouter stopped
[2023-02-15 17:12:19,59] [info] Shutting down WorkflowManagerActor - Timeout = 3600 seconds
[2023-02-15 17:12:19,59] [info] WorkflowManagerActor: All workflows finished
[2023-02-15 17:12:19,59] [info] WorkflowManagerActor stopped
[2023-02-15 17:12:19,75] [info] Connection pools shut down
[2023-02-15 17:12:19,75] [info] Shutting down SubWorkflowStoreActor - Timeout = 1800 seconds
[2023-02-15 17:12:19,75] [info] Shutting down JobStoreActor - Timeout = 1800 seconds
[2023-02-15 17:12:19,75] [info] Shutting down CallCacheWriteActor - Timeout = 1800 seconds
[2023-02-15 17:12:19,75] [info] Shutting down ServiceRegistryActor - Timeout = 1800 seconds
[2023-02-15 17:12:19,75] [info] SubWorkflowStoreActor stopped
[2023-02-15 17:12:19,75] [info] Shutting down DockerHashActor - Timeout = 1800 seconds
[2023-02-15 17:12:19,75] [info] Shutting down IoProxy - Timeout = 1800 seconds
[2023-02-15 17:12:19,75] [info] CallCacheWriteActor Shutting down: 0 queued messages to process
[2023-02-15 17:12:19,75] [info] JobStoreActor stopped
[2023-02-15 17:12:19,75] [info] CallCacheWriteActor stopped
[2023-02-15 17:12:19,75] [info] KvWriteActor Shutting down: 0 queued messages to process
[2023-02-15 17:12:19,75] [info] WriteMetadataActor Shutting down: 0 queued messages to process
[2023-02-15 17:12:19,75] [info] IoProxy stopped
[2023-02-15 17:12:19,76] [info] ServiceRegistryActor stopped
[2023-02-15 17:12:19,76] [info] DockerHashActor stopped
[2023-02-15 17:12:19,76] [info] Database closed
[2023-02-15 17:12:19,76] [info] Stream materializer shut down
[2023-02-15 17:12:19,77] [info] WDL HTTP import resolver closed
[2023-02-15 17:12:19,78] [info] Shutting down connection pool: curAllocated=0 idleQueues.size=0 waitQueue.size=0 maxWaitQueueLimit=256 closed=false
[2023-02-15 17:12:19,78] [info] Shutting down connection pool: curAllocated=0 idleQueues.size=0 waitQueue.size=0 maxWaitQueueLimit=256 closed=false
[2023-02-15 17:12:19,78] [info] Shutting down connection pool: curAllocated=0 idleQueues.size=0 waitQueue.size=0 maxWaitQueueLimit=256 closed=false
Cromwell exit code: 0
Cromwell stdout:
        [2023-02-15 17:11:51,44] [info] Running with database db.url = jdbc:hsqldb:mem:7ba29c61-823c-4132-8846-7e1315594a02;shutdown=false;hsqldb.tx=mvcc
        [2023-02-15 17:11:53,70] [info] Running migration RenameWorkflowOptionsInMetadata with a read batch size of 100000 and a write batch size of 100000
        [2023-02-15 17:11:53,71] [info] [RenameWorkflowOptionsInMetadata] 100%
        [2023-02-15 17:11:53,92] [info] Running with database db.url = jdbc:hsqldb:mem:2e54410c-5827-4e56-9f82-9117d74ed345;shutdown=false;hsqldb.tx=mvcc
        [2023-02-15 17:11:54,33] [info] Slf4jLogger started
        [2023-02-15 17:11:54,48] [info] Workflow heartbeat configuration:
        {
          "cromwellId" : "cromid-536ac8c",
          "heartbeatInterval" : "2 minutes",
          "ttl" : "10 minutes",
          "failureShutdownDuration" : "5 minutes",
          "writeBatchSize" : 10000,
          "writeThreshold" : 10000
        }
        [2023-02-15 17:11:54,52] [info] Metadata summary refreshing every 1 second.
        [2023-02-15 17:11:54,53] [info] No metadata archiver defined in config
        [2023-02-15 17:11:54,53] [info] No metadata deleter defined in config
        [2023-02-15 17:11:54,53] [info] KvWriteActor configured to flush with batch size 200 and process rate 5 seconds.
        [2023-02-15 17:11:54,53] [info] WriteMetadataActor configured to flush with batch size 200 and process rate 5 seconds.
        [2023-02-15 17:11:54,54] [info] CallCacheWriteActor configured to flush with batch size 100 and process rate 3 seconds.
        [2023-02-15 17:11:54,60] [info] JobRestartCheckTokenDispenser - Distribution rate: 50 per 1 seconds.
        [2023-02-15 17:11:54,62] [info] JobExecutionTokenDispenser - Distribution rate: 20 per 10 seconds.
        [2023-02-15 17:11:54,68] [info] SingleWorkflowRunnerActor: Version 84
        [2023-02-15 17:11:54,69] [info] SingleWorkflowRunnerActor: Submitting workflow
        [2023-02-15 17:11:54,72] [info] Unspecified type (Unspecified version) workflow 6c6b7748-ec70-4511-9ead-ae91c8929831 submitted
        [2023-02-15 17:11:54,73] [info] SingleWorkflowRunnerActor: Workflow submitted 6c6b7748-ec70-4511-9ead-ae91c8929831
        [2023-02-15 17:11:54,73] [info] 1 new workflows fetched by cromid-536ac8c: 6c6b7748-ec70-4511-9ead-ae91c8929831
        [2023-02-15 17:11:54,74] [info] WorkflowManagerActor: Starting workflow 6c6b7748-ec70-4511-9ead-ae91c8929831
        [2023-02-15 17:11:54,75] [info] WorkflowManagerActor: Successfully started WorkflowActor-6c6b7748-ec70-4511-9ead-ae91c8929831
        [2023-02-15 17:11:54,75] [info] Retrieved 1 workflows from the WorkflowStoreActor
        [2023-02-15 17:11:54,77] [info] WorkflowStoreHeartbeatWriteActor configured to flush with batch size 10000 and process rate 2 minutes.
        [2023-02-15 17:11:54,83] [info] MaterializeWorkflowDescriptorActor [6c6b7748]: Parsing workflow as WDL 1.0
        [2023-02-15 17:11:55,23] [info] MaterializeWorkflowDescriptorActor [6c6b7748]: Call-to-Backend assignments: HelloWorld.WriteGreeting -> Local
        [2023-02-15 17:11:57,49] [info] WorkflowExecutionActor-6c6b7748-ec70-4511-9ead-ae91c8929831 [6c6b7748]: Starting HelloWorld.WriteGreeting
        [2023-02-15 17:11:59,61] [info] Not triggering log of restart checking token queue status. Effective log interval = None
        [2023-02-15 17:11:59,64] [info] Not triggering log of execution token queue status. Effective log interval = None
        [2023-02-15 17:12:04,66] [info] Assigned new job execution tokens to the following groups: 6c6b7748: 1
        [2023-02-15 17:12:04,78] [info] BackgroundConfigAsyncJobExecutionActor [6c6b7748HelloWorld.WriteGreeting:NA:1]: echo 'hello Hello subworkflow!'
        [2023-02-15 17:12:04,83] [info] BackgroundConfigAsyncJobExecutionActor [6c6b7748HelloWorld.WriteGreeting:NA:1]: executing: /bin/bash /tmp/1676499109584-0/cromwell-executions/HelloWorld/6c6b7748-ec70-4511-9ead-ae91c8929831/call-WriteGreeting/execution/script
        [2023-02-15 17:12:09,58] [info] BackgroundConfigAsyncJobExecutionActor [6c6b7748HelloWorld.WriteGreeting:NA:1]: job id: 30983
        [2023-02-15 17:12:09,58] [info] BackgroundConfigAsyncJobExecutionActor [6c6b7748HelloWorld.WriteGreeting:NA:1]: Status change from - to Done
        [2023-02-15 17:12:09,80] [info] WorkflowExecutionActor-6c6b7748-ec70-4511-9ead-ae91c8929831 [6c6b7748]: Workflow HelloWorld complete. Final Outputs:
        {
          "HelloWorld.WriteGreeting.response": "/tmp/1676499109584-0/cromwell-executions/HelloWorld/6c6b7748-ec70-4511-9ead-ae91c8929831/call-WriteGreeting/execution/stdout"
        }
        [2023-02-15 17:12:14,59] [info] WorkflowManagerActor: Workflow actor for 6c6b7748-ec70-4511-9ead-ae91c8929831 completed with status 'Succeeded'. The workflow will be removed from the workflow store.
        [2023-02-15 17:12:18,52] [info] SingleWorkflowRunnerActor workflow finished with status 'Succeeded'.
        {
          "outputs": {
            "HelloWorld.WriteGreeting.response": "/tmp/1676499109584-0/cromwell-executions/HelloWorld/6c6b7748-ec70-4511-9ead-ae91c8929831/call-WriteGreeting/execution/stdout"
          },
          "id": "6c6b7748-ec70-4511-9ead-ae91c8929831"
        }
        [2023-02-15 17:12:19,57] [info] Workflow polling stopped
        [2023-02-15 17:12:19,58] [info] 0 workflows released by cromid-536ac8c
        [2023-02-15 17:12:19,58] [info] Shutting down WorkflowStoreActor - Timeout = 5 seconds
        [2023-02-15 17:12:19,59] [info] Shutting down WorkflowLogCopyRouter - Timeout = 5 seconds
        [2023-02-15 17:12:19,59] [info] Shutting down JobExecutionTokenDispenser - Timeout = 5 seconds
        [2023-02-15 17:12:19,59] [info] Aborting all running workflows.
        [2023-02-15 17:12:19,59] [info] JobExecutionTokenDispenser stopped
        [2023-02-15 17:12:19,59] [info] WorkflowStoreActor stopped
        [2023-02-15 17:12:19,59] [info] WorkflowLogCopyRouter stopped
        [2023-02-15 17:12:19,59] [info] Shutting down WorkflowManagerActor - Timeout = 3600 seconds
        [2023-02-15 17:12:19,59] [info] WorkflowManagerActor: All workflows finished
        [2023-02-15 17:12:19,59] [info] WorkflowManagerActor stopped
        [2023-02-15 17:12:19,75] [info] Connection pools shut down
        [2023-02-15 17:12:19,75] [info] Shutting down SubWorkflowStoreActor - Timeout = 1800 seconds
        [2023-02-15 17:12:19,75] [info] Shutting down JobStoreActor - Timeout = 1800 seconds
        [2023-02-15 17:12:19,75] [info] Shutting down CallCacheWriteActor - Timeout = 1800 seconds
        [2023-02-15 17:12:19,75] [info] Shutting down ServiceRegistryActor - Timeout = 1800 seconds
        [2023-02-15 17:12:19,75] [info] SubWorkflowStoreActor stopped
        [2023-02-15 17:12:19,75] [info] Shutting down DockerHashActor - Timeout = 1800 seconds
        [2023-02-15 17:12:19,75] [info] Shutting down IoProxy - Timeout = 1800 seconds
        [2023-02-15 17:12:19,75] [info] CallCacheWriteActor Shutting down: 0 queued messages to process
        [2023-02-15 17:12:19,75] [info] JobStoreActor stopped
        [2023-02-15 17:12:19,75] [info] CallCacheWriteActor stopped
        [2023-02-15 17:12:19,75] [info] KvWriteActor Shutting down: 0 queued messages to process
        [2023-02-15 17:12:19,75] [info] WriteMetadataActor Shutting down: 0 queued messages to process
        [2023-02-15 17:12:19,75] [info] IoProxy stopped
        [2023-02-15 17:12:19,76] [info] ServiceRegistryActor stopped
        [2023-02-15 17:12:19,76] [info] DockerHashActor stopped
        [2023-02-15 17:12:19,76] [info] Database closed
        [2023-02-15 17:12:19,76] [info] Stream materializer shut down
        [2023-02-15 17:12:19,77] [info] WDL HTTP import resolver closed
        [2023-02-15 17:12:19,78] [info] Shutting down connection pool: curAllocated=0 idleQueues.size=0 waitQueue.size=0 maxWaitQueueLimit=256 closed=false
        [2023-02-15 17:12:19,78] [info] Shutting down connection pool: curAllocated=0 idleQueues.size=0 waitQueue.size=0 maxWaitQueueLimit=256 closed=false
        [2023-02-15 17:12:19,78] [info] Shutting down connection pool: curAllocated=0 idleQueues.size=0 waitQueue.size=0 maxWaitQueueLimit=256 closed=false

Cromwell stderr:

Saving copy of Cromwell stdout to: /home/fhembroff/Documents/work/incorrect-wdl-validation/learn-wdl/1_script_examples/1_hello_worlds/7_subworkflow/Cromwell.stdout.txt
Saving copy of Cromwell stderr to: /home/fhembroff/Documents/work/incorrect-wdl-validation/learn-wdl/1_script_examples/1_hello_worlds/7_subworkflow/Cromwell.stderr.txt
Output files left in place

@fhembroff fhembroff marked this pull request as ready for review February 15, 2023 22:43
@fhembroff fhembroff changed the title Correct Incorrect WDL validation Fix Incorrect WDL validation Feb 15, 2023
Copy link
Contributor

@coverbeck coverbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good for the existing way we handle this. But I think in the future we should do one of these 2 things (a separate ticket, if agreed):

  1. If we want to do this check before launching something, we should use Cromwell instead of regular expressions.
  2. Without knowing the whole history behind this, it's not clear to me that we need this check at all -- why not let the runtime (Cromwell) display an error instead if there is an issue with the WDL?

return true; //this is a valid WDL file
// check all the required fields and give error message if it's missing
if (wfFound && callFound) {
String missingPotentiallyRequiredFields = "";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might find it easier to just have a List<String>, then use String.join().

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

} else {
//WDL file but some required fields are missing
// WDL file but some required fields are missing
String missingPotentiallyRequiredFields = "";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use List as well here and next line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

88.9% 88.9% Coverage
0.0% 0.0% Duplication

@fhembroff
Copy link
Contributor Author

fhembroff commented Feb 16, 2023

This is good for the existing way we handle this. But I think in the future we should do one of these 2 things (a separate ticket, if agreed):

Ticket created: SEAB-5265

@fhembroff fhembroff merged commit 8e49041 into develop Feb 16, 2023
@fhembroff fhembroff deleted the feature/DOCK-2245/incorrect-wdl-vaidation branch February 16, 2023 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.