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

Incorrect validation warning when combining "scatter" and "when" #1639

Open
tetron opened this issue Mar 7, 2022 · 0 comments
Open

Incorrect validation warning when combining "scatter" and "when" #1639

tetron opened this issue Mar 7, 2022 · 0 comments

Comments

@tetron
Copy link
Member

tetron commented Mar 7, 2022

Expected Behavior

Should not give a warning when scattering with a conditional connects to an array of optional values.

Actual Behavior

It gaves a warning because the output type is computed incorrectly for the order of operations in a step that has both a scatter and a conditional.

Workflow Code

inputs:
  fastq1:
    type: File
  fastq2:
    type: File?

steps:
  fastq-validator:
    run: tools/fastqValidator.cwl
    in:
      file:
        - fastq1
        - fastq2
    out: [std_out]
    scatter: file
    when: $(inputs.file != null)

  adjust-names:
    in:
      fqValidator: fastq-validator/std_out
    out: [fq1, fq2]
    run: adjust-names.cwl
workflow.cwl:21:11: Source 'std_out' of type ["null", {"type": "array", "items": "File"}] may be
                    incompatible
workflow.cwl:28:7:    with sink 'fqValidator' of type {"type": "array", "items": ["null", "File"]}
                      Source is from conditional step and may produce `null`

The checker is using the wrong type for fastq-validator/std_out, it should be {"type": "array", "items": ["null", "File"]}.

Your Environment

cwltool 3.1.20220221215214

tetron added a commit that referenced this issue Mar 7, 2022
Typing related to conditionals should be part of the computed output
signature of the step, not added in by the checker.

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>
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