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

cwltool --pack does not handle collisions correctly #1937

Open
mvdbeek opened this issue Nov 6, 2023 · 2 comments
Open

cwltool --pack does not handle collisions correctly #1937

mvdbeek opened this issue Nov 6, 2023 · 2 comments

Comments

@mvdbeek
Copy link

mvdbeek commented Nov 6, 2023

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
@mvdbeek mvdbeek changed the title cwltool --pack does not handle collisions correctly cwltool --pack does not handle collisions correctly Nov 6, 2023
@mr-c
Copy link
Member

mr-c commented Nov 6, 2023

Thank you @mvdbeek for the report; does using cwlpack from https://github.com/rabix/sbpack work for you?

@mvdbeek
Copy link
Author

mvdbeek commented Nov 6, 2023

Yes, that's what I generated the expected version with

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

2 participants