Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selected input parameter type is not propagated as output parameter type #2039

Open
adrabent opened this issue Sep 9, 2024 · 0 comments
Open

Comments

@adrabent
Copy link

adrabent commented Sep 9, 2024


Expected Behavior

cwltool should treat the input type identical to the output type (at least if it accepts two different types)

Actual Behavior

cwltool crashes, because it always uses the output type Directory instead of Directory[]

Workflow Code

class: CommandLineTool
cwlVersion: v1.2
id: pass
baseCommand: echo
inputs:
  - id: msin
    type: 
      - Directory
      - Directory[]
outputs:
  - id: msout
    type:
      - Directory
      - Directory[]
    outputBinding:
      outputEval: $(inputs.msin)

I call the command like this:

cwltool steps/pass.cwl debug.json

with debug.json:

{
    "msin": [
                {"class": "Directory", "path": "<dir1>"},
                {"class": "Directory", "path": "<dir2>"}
            ]
}

Full Traceback

INFO /usr/local/conda/envs/toil/bin/cwltool 3.1.20240508115724
INFO Resolved 'steps/pass.cwl' to 'file:///home/alex/software/LINC/steps/pass.cwl'
INFO [job pass] /tmp/6scfxd33$ echo

ERROR [job pass] Job error:
("Error collecting output for parameter 'msout': steps/pass.cwl:19:7: Multiple matches for output item that is a single file.", {})
WARNING [job pass] completed permanentFail
{}
WARNING Final process status is permanentFail

Your Environment

  • cwltool version: 3.1.20240508115724

What works

  • Removing one element from debug.json so that the array has only one element
  • Removing Directory as a possible output type for msout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant