common-workflow-language / common-workflow-language/cwltool

`loadListing` behavior in workflow steps

Open
#2,218 2 comments 0 reactions 1 assignee Claimed by @mr-c View on GitHub
Dominant language
Python
Stars
376
Forks
255
Avg merge
2d 7h
Merged PRs (30d)
12

Description

I have encountered in cwltool a situation where `loadListing` behavior seems inconsistent when a Directory is passed from a Workflow input to a CommandLineTool step with different `loadListing` requirements.

In my scenario the workflow defines an input Directory with `loadListing: deep_listing`, and a step (CommandLineTool) takes that Directory as input but defines `loadListing: no_listing`.

The directory object inside the CommandLineTool still contains the listing, even though the step explicitly requests `no_listing`.
However, I expect the step input to respect its own `loadListing: no_listing` definition rather than inheriting the upstream state.

Is the current behavior of cwltool correct?

Here an example.
I expect `out_none: true` instead i got `out_none: false`

```
#!/usr/bin/env cwl-runner
class: Workflow
cwlVersion: v1.2
inputs:
d2:
type: Directory
loadListing: deep_listing
outputs:
out_none:
type: boolean
outputSource: step_none/out
steps:
step_none:
in:
d: d2
out: [out]
run:
class: CommandLineTool
cwlVersion: v1.2
requirements:
InlineJavascriptRequirement: {}
inputs:
d:
type: Directory
loadListing: no_listing
outputs:
out:
type: boolean
outputBinding:
outputEval: $(inputs.d.listing === undefined)
baseCommand: "true"
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.