kestra-io / kestra

:zap: Workflow Automation Platform. Orchestrate & Schedule code in any language, run anywhere, 500+ plugins. Alternative to Zapier, Rundeck, Camunda, Airflow...
https://kestra.io
Apache License 2.0
13.25k stars 1.15k forks source link

UI Flow Dependencies display is not adjusted to match Flow trigger preconditions — since no conditions are defined, UI shows all flows in the instance as dependencies #6100

Open anna-geller opened 8 hours ago

anna-geller commented 8 hours ago

Describe the issue

To reproduce, add 2 flows, myflow depending on child flow:

id: myflow
namespace: company.team

tasks:
  - id: hello
    type: io.kestra.plugin.core.log.Log
    message: Hello World!

triggers:
  - id: flow_trigger
    type: io.kestra.plugin.core.trigger.Flow
    preconditions:
      id: child_flow
      flows:
        - namespace: company.team
          flowId: child
          states: [SUCCESS]

and child flow:

id: child
namespace: company.team

tasks:
  - id: hello
    type: io.kestra.plugin.core.log.Log
    message: Hello from {{ flow.id }}

Then refresh the page of the myflow and go to Dependencies tab: you will see that all flows in the instance are listed as dependencies. We need to fix it to first check for preconditions, only then check for conditions.

image

Note that backend behavior is OK — running any tutorial flow will not trigger an execution of myflow. Only the UI needs adjustment.

@loicmathieu if you have any suggestions for the front end folks on how to tackle this, please share

Environment

anna-geller commented 8 hours ago

btw @loicmathieu I noticed that id is still required -- if it's possible to cut this 🙏

    preconditions:
      id: child_flow

image