I’m using cwl-runner 3.1.20210628163208 and I’m running a CWL Workflow with several steps.
The execution is successful but the tmp dirs are not deleted. I’ve tried using --rm-tmpdir although it’s the default behaviour but no luck, the tmp dirs are not deleted.
Am I missing something obvious or I ran into a bug?
Based upon the version number, I assume that you’ve got the CWL reference runner (cwltool) installed as the default cwl-runner. Did a previous version of cwltool correctly delete the temporary directories?
Hello @mrc
Your assumptions are correct. I can’t tell if it’s a regression wrt a previous version of cwltool.
If needed, I can try a few versions to verify this
@mrc I am not sure if it is a workflow file issue. The issue I was raising was that no matter the workflow that the temp directory is not cleared when the run is finished. This causes an accumulation of temporary files on the system.
Had a break for lunch so decided to take a look at this issue
I think I found the issue, just need to figure out how to write a test. I used the hello workflow from this example from the user guide.
Running with a debugger: cwltool --tmpdir-prefix /tmp/cwl/ /tmp/1st-tool.cwl /tmp/echo-job.yml
I had created /tmp/cwl/, and copied the user guide examples to /tmp. I set two breakpoints, one in each part where temporary directories are removed in executors.py and in job.py.
In the executors.py, there’s a line:
if runtime_context.cachedir is None:
The issue is when cachedir is "", which was my case when running the hello workflow. That skipped that if statement, and then the temporary directory would not be removed.