Skip to content

--single-process does not work for steps in nested workflows #1530

@jdidion

Description

@jdidion

I am trying to using --single-process to execute a step in a subworkflow in the packed form of https://github.com/common-workflow-language/cwl-v1.2/tree/main/tests/count-lines8-wf.cwl. No matter how I specify the step cwltool cannot find it:

cwltool --debug --single-process count-lines-wf/step1 test/cwl_conformance/workflows/count-lines8-wf.cwl.json foo.json
INFO /Users/jdidion/.pyenv/versions/3.6.14/envs/dxc/bin/cwltool 3.1.20210901184224
INFO Resolved 'test/cwl_conformance/workflows/count-lines8-wf.cwl.json' to 'file:///Users/jdidion/projects/dxCompiler/test/cwl_conformance/workflows/count-lines8-wf.cwl.json'
ERROR I'm sorry, I couldn't load this CWL file.
The error was: 
Traceback (most recent call last):
  File "/Users/jdidion/.pyenv/versions/3.6.14/envs/dxc/lib/python3.6/site-packages/cwltool/main.py", line 1117, in main
    ctool = choose_process(args, tool, loadingContext)
  File "/Users/jdidion/.pyenv/versions/3.6.14/envs/dxc/lib/python3.6/site-packages/cwltool/main.py", line 854, in choose_process
    loadingContext.loader.idx,
  File "/Users/jdidion/.pyenv/versions/3.6.14/envs/dxc/lib/python3.6/site-packages/cwltool/subgraph.py", line 202, in get_process
    raise Exception(f"Step {step_id} was not found")
Exception: Step file:///Users/jdidion/projects/dxCompiler/test/cwl_conformance/workflows/count-lines8-wf.cwl.json#main/count-lines-wf/step1 was not found
{
    "$graph": [
        {
            "class": "Workflow",
            "inputs": [
                {
                    "type": "File",
                    "id": "#count-lines1-wf.cwl/file1"
                }
            ],
            "outputs": [
                {
                    "type": "int",
                    "outputSource": "#count-lines1-wf.cwl/step2/output",
                    "id": "#count-lines1-wf.cwl/count_output"
                }
            ],
            "steps": [
                {
                    "run": "#wc-tool.cwl",
                    "in": [
                        {
                            "source": "#count-lines1-wf.cwl/file1",
                            "id": "#count-lines1-wf.cwl/step1/file1"
                        }
                    ],
                    "out": [
                        "#count-lines1-wf.cwl/step1/output"
                    ],
                    "id": "#count-lines1-wf.cwl/step1"
                },
                {
                    "run": "#parseInt-tool.cwl",
                    "in": [
                        {
                            "source": "#count-lines1-wf.cwl/step1/output",
                            "id": "#count-lines1-wf.cwl/step2/file1"
                        }
                    ],
                    "out": [
                        "#count-lines1-wf.cwl/step2/output"
                    ],
                    "id": "#count-lines1-wf.cwl/step2"
                }
            ],
            "id": "#count-lines1-wf.cwl"
        },
        {
            "class": "Workflow",
            "inputs": [
                {
                    "type": "File",
                    "id": "#main/file1"
                }
            ],
            "outputs": [
                {
                    "type": "int",
                    "outputSource": "#main/step1/count_output",
                    "id": "#main/count_output"
                }
            ],
            "requirements": [
                {
                    "class": "SubworkflowFeatureRequirement"
                }
            ],
            "steps": [
                {
                    "run": "#count-lines1-wf.cwl",
                    "in": [
                        {
                            "source": "#main/file1",
                            "id": "#main/step1/file1"
                        }
                    ],
                    "out": [
                        "#main/step1/count_output"
                    ],
                    "id": "#main/step1"
                }
            ],
            "id": "#main"
        },
        {
            "class": "ExpressionTool",
            "requirements": [
                {
                    "class": "InlineJavascriptRequirement"
                }
            ],
            "inputs": [
                {
                    "type": "File",
                    "loadContents": true,
                    "id": "#parseInt-tool.cwl/file1"
                }
            ],
            "outputs": [
                {
                    "type": "int",
                    "id": "#parseInt-tool.cwl/output"
                }
            ],
            "expression": "$({'output': parseInt(inputs.file1.contents)})",
            "id": "#parseInt-tool.cwl"
        },
        {
            "class": "CommandLineTool",
            "inputs": [
                {
                    "type": "File",
                    "id": "#wc-tool.cwl/file1"
                }
            ],
            "outputs": [
                {
                    "type": "File",
                    "outputBinding": {
                        "glob": "output"
                    },
                    "id": "#wc-tool.cwl/output"
                }
            ],
            "baseCommand": [
                "wc",
                "-l"
            ],
            "stdin": "$(inputs.file1.path)",
            "stdout": "output",
            "id": "#wc-tool.cwl"
        }
    ],
    "cwlVersion": "v1.2"
}

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