Open buchanae opened 7 years ago
It appears that --pack
mangles ids, for example outputSource: step0/echo-out-filename
became "outputSource": "#main/step0/echo-out-filename"
which is, I guess by the look or it, RDF processing done on ids, and bunny doesn't do RDF (nor I'm aware of the spec interpretation that would make understanding such id's necessary from the conformance standpoint). So I would treat it as a bug in cwltool, because it does more than it promisses (Combine components into single document and print).
@tetron Can you confirm that cwltool is doing something special here?
FYI: http://www.commonwl.org/v1.0/Workflow.html#Syntax reminds CWL implementations that the preprocessing steps described in schema salad must be applied: http://www.commonwl.org/v1.0/SchemaSalad.html#Document_preprocessing
The addition of #main
is done to disambiguate between the objects within the $graph
of https://github.com/common-workflow-language/workflows/blob/master/workflows/hello/hello-param.cwl
@mr-c So you are saying that resolved document is valid CWL1? I understood that "document should be preprocessed in this way" means that it should be comprehended/resolved by stated rules, not that the result of such processing is still a valid app. Finally there is no conformance test using form "#id" for identifiers, let alone one with prepended additional identifiers, so I'm not sure how should anyone implementing the spec figure out that they are supposed to expect such ids.
Hey @StarvingMarvin
I found a conformance test that uses $graph
and prepending the id to a step name (like #main/index/result
):
https://github.com/common-workflow-language/common-workflow-language/blob/master/v1.0/conformance_test_v1.0.yaml#L370
https://github.com/common-workflow-language/common-workflow-language/blob/master/v1.0/v1.0/search.cwl
@StarvingMarvin I agree that this is an area in need of clarification in the spec
@mr-c, @buchanae this was quite a blunder on my side. Since we are passing conformance tests, and since the "hello" example started working when I've returned ids to their original values, I jumped to the wrong conclusions. @sinisa88 should be able to give better answer to what is going on, since he implemented most of the features needed to pass the tests.
@StarvingMarvin No worries, it was a useful conversation
No worries, thanks for taking the time to look into it everyone!
It seems we have a conflict between specifications. Here is quote from the spec:
A
WorkflowStepInput
object must contain anid
field in the form#fieldname
or#stepname.fieldname
. When theid
field contains a period.
the field name consists of the characters following the final period. This defines a field of the workflow step input object with the value of the source parameter(s).
and pack produces id in form #main/step0/echo-in-message
which has additional prefix, and is separated with slashes instead of a dot.
If we look at the mentioned conformance test, it has id's as specified by the CWL spec, not in the form that pack command outputs.
What I intended to happen was to switch from dot to slash as separators between draft-3 and v1.0. So the spec text should have been updated, but was not.
The scoped identifier rules in schema salad specify slashes for constructing the concrete identifiers, which is where those ids in --pack come from.
If that's going to be a problem and not just a clarification, we should talk about it.
You're right that there needs to be additional conformance tests using concrete identifiers (including dots and slashes).
I'm working on a v1.0.1 errata spec update here: https://github.com/common-workflow-language/common-workflow-language/pull/410
@tetron A silly question, assuming this cwl snippet:
cwlVersion: v1.0
id: toplevel
$graph:
- id: wf
steps:
step_name:
out: [<ID GOES HERE>]
other_step_name:
# ...
which of these (if any) would not be a valid at ID GOES HERE
place?
Followup question: which would be invalid as a source on other's step input?
Seems like bunny has an issue with workflows packed by cwltool, possibly this is a bug with $graph handling.
I'll try to describe some steps to reproduce
Building with
mvn package -P cwl
and adding a couple debug logs, I get:Not sure yet if that exposes the root cause. I tried to track down the (alleged) bug in traverse(), but didn't succeed.