Skip to content

cwltool --pack does not handle collisions correctly #1937

@mvdbeek

Description

@mvdbeek

Expected Behavior

cwltool --pack https://raw.githubusercontent.com/common-workflow-language/cwl-v1.1/main/tests/conflict-wf.cwl should resolve conflicts and output an equivalent workflow to cwlpack output:

$graph:
- baseCommand: echo
  class: CommandLineTool
  id: echo
  inputs:
    text:
      inputBinding: {}
      type: string
  outputs:
    fileout:
      outputBinding: {glob: out.txt}
      type: File
  stdout: out.txt
- baseCommand: cat
  class: CommandLineTool
  id: cat
  inputs:
    file1:
      inputBinding: {position: 1}
      type: File
    file2:
      inputBinding: {position: 2}
      type: File
  outputs:
    fileout:
      outputBinding: {glob: out.txt}
      type: File
  stdout: out.txt
- class: Workflow
  id: collision
  inputs: {input_1: string, input_2: string}
  outputs:
    fileout: {outputSource: cat_step/fileout, type: File}
  steps:
    cat_step:
      in:
        file1: {source: echo_1/fileout}
        file2: {source: echo_2/fileout}
      out: [fileout]
      run: '#cat'
    echo_1:
      in: {text: input_1}
      out: [fileout]
      run: '#echo'
    echo_2:
      in: {text: input_2}
      out: [fileout]
      run: '#echo'
cwlVersion: v1.1

Actual Behavior

cwltool --pack https://raw.githubusercontent.com/common-workflow-language/cwl-v1.1/main/tests/conflict-wf.cwl swallows the workflow (without any error):

{
    "$graph": [
        {
            "id": "#main/cat",
            "class": "CommandLineTool",
            "inputs": [
                {
                    "type": "File",
                    "inputBinding": {
                        "position": 1
                    },
                    "id": "#main/cat/file1"
                },
                {
                    "type": "File",
                    "inputBinding": {
                        "position": 2
                    },
                    "id": "#main/cat/file2"
                }
            ],
            "baseCommand": "cat",
            "stdout": "out.txt",
            "outputs": [
                {
                    "type": "File",
                    "outputBinding": {
                        "glob": "out.txt"
                    },
                    "id": "#main/cat/fileout"
                }
            ]
        },
        {
            "id": "#main/echo",
            "class": "CommandLineTool",
            "inputs": [
                {
                    "type": "string",
                    "inputBinding": {},
                    "id": "#main/echo/text"
                }
            ],
            "outputs": [
                {
                    "type": "File",
                    "outputBinding": {
                        "glob": "out.txt"
                    },
                    "id": "#main/echo/fileout"
                }
            ],
            "baseCommand": "echo",
            "stdout": "out.txt"
        }
    ],
    "cwlVersion": "v1.1"
}

Your Environment

  • cwltool version:
    3.1.20231020140206.dev3+g4337bee3.d20231105

Metadata

Metadata

Assignees

No one assigned

    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