-
Notifications
You must be signed in to change notification settings - Fork 3
Feature/dock 2353/hello world workflow fails #236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/dock 2353/hello world workflow fails #236
Conversation
… input files are provisioned.
Fix sonarcloud issues
| } | ||
| } else { | ||
| LOG.debug("No test parameter file provided, skipping provisioning"); | ||
| provisionFiles = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know CWL very well, but it seems like you are saying, if there are no inputs, then there are no outputs.
Aren't those separate, or are they tied together?
IOW, can't you have a workflow with inputs but no outputs, or even one with outputs but no inputs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that you can still have output files, but in your test parameter file you can specify where you want to upload your result files to. Because
dockstore-cli/dockstore-client/src/main/java/io/dockstore/client/cli/nested/BaseLanguageClient.java
Line 215 in 52c762d
| provisionOutputFiles(); |
calls this method
dockstore-cli/dockstore-client/src/main/java/io/github/collaboratory/cwl/CWLClient.java
Line 1015 in 20aa167
| public static List<ImmutablePair<String, FileProvisioning.FileInfo>> registerOutputFiles(Map<String, List<FileProvisioning.FileInfo>> fileMap, |
and my understanding is that fileMap is obtained from the test parameter file. I could be wrong on this though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change would also effect WDL workflows, but I don't think this would cause an issue, as WDL workflows call
dockstore-cli/dockstore-client/src/main/java/io/github/collaboratory/cwl/CWLClient.java
Line 1015 in 20aa167
| public static List<ImmutablePair<String, FileProvisioning.FileInfo>> registerOutputFiles(Map<String, List<FileProvisioning.FileInfo>> fileMap, |
too and I believe for a WDL workflow fileMap would still be empty. Meaning that the above method doesn't do anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think the wrinkle here may be that WDL does something sane if there is no output location declared, but CWL doesn't
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd misread the code in my earlier comments, so it's good. I thought it was reading the parameter definitions in the descriptor and acting off of that, which was the source of my questions. What it's doing instead is:
- Is there an input parameter file?
- If there isn't, don't bother doing the output provisioning.
And that is correct and works.
|
Kudos, SonarCloud Quality Gate passed! |
This is pretty surprising to me, may need to do some experimentation to confirm |
|
Retarget to release/1.14 per issue milestone |
| } | ||
| } else { | ||
| LOG.debug("No test parameter file provided, skipping provisioning"); | ||
| provisionFiles = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd misread the code in my earlier comments, so it's good. I thought it was reading the parameter definitions in the descriptor and acting off of that, which was the source of my questions. What it's doing instead is:
- Is there an input parameter file?
- If there isn't, don't bother doing the output provisioning.
And that is correct and works.
Description
This PR allows you to launch CWL workflows/tools that do not have a test parameter file.
Currently, if you try and launch a CWL tool or workflow without a test parameter file, you get this error:
With this PR, no error occurs.
What was causing this error?
This error was occurring because the variable outputMap is only initialized when this line is called, however that line is only called when a test parameter file is provided (due to this if condition). However, we were always calling this line, which is what was leading to the error.
Now I have made it such that if we do not provision the input files (from the test parameter file), we do not provision the output files. Which means that we now do not call this line, if outputMap is not initialized.
Review Instructions
Ensure that you can launch a CWL workflow and tool that without a test parameter file.
Ensure that you can successfully launch the tool described in the ticket.
Issue
DOCK-2353
dockstore/dockstore#5427
I believe this PR should also fix: dockstore/dockstore#4922
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!
./mvnw clean install