common-workflow-language / cwltool

Common Workflow Language reference implementation
https://cwltool.readthedocs.io/
Apache License 2.0
336 stars 231 forks source link

`cwltool --pack` has trouble with relative paths in second level linked files #1243

Open ghost opened 4 years ago

ghost commented 4 years ago

The following workflow https://github.com/genome/analysis-workflows/blob/master/definitions/pipelines/bisulfite.cwl has a linked sub-workflow https://github.com/genome/analysis-workflows/blob/master/definitions/subworkflows/bam_to_trimmed_fastq_and_biscuit_alignments.cwl which has a linked tool https://github.com/genome/analysis-workflows/blob/master/definitions/tools/bam_to_fastq.cwl

cwltool --pack pipelines/bisulfite.cwl
INFO /Users/kghose/.venvs/cwltool/bin/cwltool 2.0.20200126090152
INFO Resolved 'pipelines/bisulfite.cwl' to 'file:///Users/kghose/Work/code/benten/tests/cwl/mgi/pipelines/bisulfite.cwl'
ERROR Tool definition failed validation:
[Errno 2] No such file or directory: '/Users/kghose/Work/code/benten/tests/cwl/tools/bam_to_fastq.cwl'

Seems like this second level relative file path confuses cwltool --pack

2.0.20200126090152
phaverty commented 4 years ago

This has been my experience as well

tetron commented 4 years ago

I've been doing some work on --pack and with https://github.com/common-workflow-language/cwltool/pull/1263 the example works.

serge2016 commented 4 years ago

I think it's related to https://github.com/common-workflow-language/cwltool/issues/1103

ghost commented 4 years ago

Related or dupe of #1240