kantale / OpenBio.eu

An Open Collaborative Scientific Environment
BSD 3-Clause "New" or "Revised" License
7 stars 6 forks source link

Getting output value from more than one step renders the workflow inexportable #242

Closed irtzonevrakis closed 2 years ago

irtzonevrakis commented 2 years ago

Steps to reproduce:

  1. Create a new workflow named 'test' with an output 'outp1'

  2. Create a step 'step1' with the following bash code: output__outp1__test__1="test"

  3. Create a step 'step2' with the following bash code: echo ${output__outp1__test__1}

  4. Add the following bash code to the main step:

    step__step1__test__1
    step__step2__test__1
  5. Save the workflow, then export it to Argo.

Expected result: Workflow is exported normally.

Actual result: The system errors out with 'OBC: Output variable: outputoutp1test1 is set by more than one steps: stepstep1test1 stepstep2test__1 ', even though 'outp1' is only set in step1.

I have attached the JSON of the minimal reproducible example discussed above. workflow_bug.zip

kantale commented 2 years ago

Confirmed.

kantale commented 2 years ago

The problem: In line 565 (executor.py) it clearly mentions:

        The 'inputs' and 'outputs' fields for every step does NOT contain which variables are set and read respectively.
        It contains which variables are **referred**

Yet in lines removed from f463030 the outputs fields were treated as only setting the variables