Skip to content

loadListing behavior in workflow steps #2218

@LanderOtto

Description

@LanderOtto

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"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions