Closed alexiswl closed 3 years ago
Thank you @alexiswl for your issue. This is due to us clarifying a behaviour that is now explicitly allowed in CWL version 1.2
If you change your cwlVersion
to v1.2
then this will work.
If you change your cwlVersion to v1.2 then this will work.
If the endpoint to supports v1.2? I'm sure my local machine does where I've tested, but that doesn't mean I can upload them to a service running an older cwltool version. I've worked around most cases for now by just removing the slash and having the dirent in the working directory.
This will also break users' workflows on an endpoint if the endpoint updates its cwltool version.
Could this error not be a warning instead?
If you change your cwlVersion to v1.2 then this will work.
If the endpoint to supports v1.2?
Yes, there is a conformance test for CWL v1.2 that confirms that paths starting with /
are allowed as long as there is a DockerReqirement
under requirements
as per the requirements in CWL v1.2 Dirent.entryname
. As far as we know, older versions of cwltool
were the only CWL runners that supported paths starting with /
, so your CommandLineTool
would likely not have worked with any other CWL aware workflow runner.
So this was never allowed in CWL v1.0 or v1.1 and only accidentally worked sometimes in cwltool due to a bug,
As cwltool is the reference CWL runner, and thus sets the expectation that if a workflow works with cwltool
then that workfow should work on any other CWL-aware workflow system. So it is important that we fixed this bug in cwltool. Unfortunately this bug was a feature you were relying on.
As cwltool is a reference runner, and not meant to be a production runner, we strongly suggest that any users of cwltool
pin a particular version.
I've worked around most cases for now by just removing the slash and having the dirent in the working directory.
Glad you've been able to find a better solution. That is more flexible anyhow! Makes it easier to switch to another software container.
As far as we know, older versions of cwltool were the only CWL runners that supported paths starting with /, so your CommandLineTool would likely not have worked with any other CWL aware workflow runner.
But this includes Toil since it calls cwltool right? And my experience with an Airflow/Kubernetes platform also supported it.
Which is why I thought a warning would be more appropriate than an error.
As far as we know, older versions of cwltool were the only CWL runners that supported paths starting with /, so your CommandLineTool would likely not have worked with any other CWL aware workflow runner.
But this includes Toil since it calls cwltool right?
Depends, we'd have to check the exact versions of cwltool
that toil-cwl-runner
pinned in different releases.
Regardless, there are many CWL implementations that don't use cwltool
or don't use the part of cwltool
that had this accidental feature.
Which is why I thought a warning would be more appropriate than an error.
I understand this could hurt a bit, and we are sorry for that.
I could fix that. What might be a better error message?
Thanks for volunteering @twigleingrid
A better error message might be
Name '/scripts/myscript.sh' at index 0 of listing is invalid, paths starting with '/' are only permitted in CWL 1.2 and later. Consider changing the absolute path to a relative path, or upgrade the CWL description to CWL v1.2 using https://pypi.org/project/cwl-upgrader/
Intro
I am getting this error:
yet mounting an absolute path also works in previous versions of CWL.
By upgrading cwltool, I no longer have backwards compatibility for this tool.
The following cwltool completes successfully using cwltool version:
3.0.20200709181526
but fails using version:
3.0.20200807132242
.Commandline Tool
Input
Expected behaviour:
Actual Behavior
Tell us what happens instead
Full Traceback
Your Environment