common-workflow-language / cwltool

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

internals: setting update.LATEST to "v1.1.0-dev1" fails with embedded CommandLineTools #943

Open mr-c opened 5 years ago

mr-c commented 5 years ago

This is mostly for @tetron

diff --git a/cwltool/update.py b/cwltool/update.py
index 9e79b98a..495d2c19 100644
--- a/cwltool/update.py
+++ b/cwltool/update.py
@@ -133,7 +44,7 @@ DEVUPDATES = {
 ALLUPDATES = UPDATES.copy()
 ALLUPDATES.update(DEVUPDATES)

-LATEST = u"v1.0"
+LATEST = u"v1.1.0-dev1"
$ cwltool --debug tests/wf/scatter-wf4.cwl tests/wf/scatter-job2.json
Resolved 'tests/wf/scatter-wf4.cwl' to 'file:///home/mcrusoe/cwltool/tests/wf/scatter-wf4.cwl' 
Validation exception 
Tool definition file:///home/mcrusoe/cwltool/tests/wf/scatter-wf4.cwl#echo failed validation:
tests/wf/scatter-wf4.cwl:4:3:   checking object `tests/wf/scatter-wf4.cwl#echo`
tests/wf/scatter-wf4.cwl:6:3:     checking field `requirements`
tests/wf/scatter-wf4.cwl:1:1:       checking item
tests/wf/scatter-wf4.cwl:6:3:         Field `class` contains undefined reference to `file:///home/mcrusoe/cwltool/tests/wf/NetworkAccess`
Traceback (most recent call last):
  File "/home/mcrusoe/cwltool/cwltool/workflow.py", line 619, in __init__
    toolpath_object["run"], loadingContext)
  File "/home/mcrusoe/cwltool/cwltool/load_tool.py", line 372, in load_tool
    metadata=loadingContext.metadata)
  File "/home/mcrusoe/cwltool/cwltool/load_tool.py", line 284, in validate_document
    workflowobj, fileuri, checklinks=do_validate)
  File "/home/mcrusoe/cwltool/env3/lib/python3.6/site-packages/schema_salad/ref_resolver.py", line 919, in resolve_all
    self.validate_links(document, u"", all_doc_ids)
  File "/home/mcrusoe/cwltool/env3/lib/python3.6/site-packages/schema_salad/ref_resolver.py", line 1091, in validate_links
    raise errors[0]
mr-c commented 5 years ago

I dug into this a bit, seems the metadata has (correctly) the original cwlVersion but while instantiating the WorkflowSteps the revised cwlVersion isn't available.

@tetron What do you suggest?