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

Validation: matching types flagged as incompatible for multiple inputs #929

Open
ghost opened this issue Oct 2, 2018 · 5 comments
Open

Comments

@ghost
Copy link

ghost commented Oct 2, 2018

A workflow with single optional array input connecting to node with optional array input passes validation. A workflow with a pair of optional array inputs connecting to same node with merge_flattened raises compatibility warnings.

Expected Behavior

Workflow should pass with no warnings, since the inputs are of matching types.

Actual Behavior

cwltool --validate --non-strict multi-input-flattened.cwl
/Users/kghose/miniconda2/envs/cwl/bin/cwltool 1.0.20180923172926
Resolved 'multi-input-flattened.cwl' to 'file:///Users/kghose/Work/cwltool-bugs/link_merge/multi-input-flattened.cwl'
Workflow checker warning:
multi-input-flattened.cwl:7:5:  Source 'in1' of type ["null", {"type": "array", "items": "string"}]
                                may be incompatible
multi-input-flattened.cwl:18:9:   with sink 'array' of type ["null", {"type": "array", "items":
                                  "string"}]
                                  source has linkMerge method merge_flattened
multi-input-flattened.cwl:9:5:  Source 'in2' of type ["null", {"type": "array", "items": "string"}]
                                may be incompatible
multi-input-flattened.cwl:18:9:   with sink 'array' of type ["null", {"type": "array", "items":
                                  "string"}]
                                  source has linkMerge method merge_flattened
multi-input-flattened.cwl is valid CWL.

Workflow Code

app.cwl:

class: CommandLineTool
cwlVersion: v1.0
id: app
baseCommand:
  - echo
inputs:
  - id: array
    type: 'string[]?'
    inputBinding:
      position: 0
outputs:
  - id: output
    type: File?
    outputBinding:
      glob: '*.txt'
label: app
requirements:
  - class: DockerRequirement
    dockerPull: alpine
stdout: out.txt

multi-input-flattened.cwl:

class: Workflow
cwlVersion: v1.0
id: multi_input_flattened
label: multi-input-flattened
inputs:
  - id: in1
    type: 'string[]?'
  - id: in2
    type: 'string[]?'
outputs:
  - id: output
    outputSource:
      - app/output
    type: File?
steps:
  - id: app
    in:
      - id: array
        linkMerge: merge_flattened
        source:
          - in1
          - in2
    out:
      - id: output
    run: ./app.cwl
    label: app
requirements:
  - class: MultipleInputFeatureRequirement

single-input.cwl:

class: Workflow
cwlVersion: v1.0
id: single_input
label: single-input
inputs:
  - id: in1
    type: 'string[]?'
outputs:
  - id: output
    outputSource:
      - app/output
    type: File?
steps:
  - id: app
    in:
      - id: array
        source: in1
    out:
      - id: output
    run: ./app.cwl
    label: app
requirements: []
@migbro
Copy link

migbro commented Jan 27, 2022

This is causing one of our workflows to fail validation - any chance this will get worked on?

@migbro
Copy link

migbro commented Jan 27, 2022

Thanks in advance, really appreciate it!

@tetron
Copy link
Member

tetron commented Jan 27, 2022

This is causing one of our workflows to fail validation - any chance this will get worked on?

Actually failing or just giving an annoying warning?

I agree that it looks like either the type checking is bugged, or the warning message is bugged.

@dmiller15
Copy link

Actually, I think our issue might be something else unrelated to this issue. You can ignore @migbro's and my complaint.

@tetron
Copy link
Member

tetron commented Jan 27, 2022

Thanks for the follow up, we'll investigate but I'm glad it isn't blocking you.

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

3 participants