StackStorm / orquesta

Orquesta is a graph based workflow engine for StackStorm. Questions? https://github.com/StackStorm/st2/discussions
https://docs.stackstorm.com/orquesta/
Apache License 2.0
98 stars 39 forks source link

Improve inspect context and detect undefined task logic. #254

Closed yogeshgoyal26 closed 1 month ago

yogeshgoyal26 commented 1 year ago

Improvement in inspect context and detect undefined task logic to improve overall execution performance of inspect. Specifically scenarios where the tasks success and failure are moved to same task in the workflow, then in that case the tasks are added to the queue in multiple of 2, which increase the overall time take by inspect method. Below is an example workflow: Task1 - Added 1 time Task2 - Added 2 times Task3 - Added 4 times Task4 - Added 8 times ..

---
version: "1.0"
description: "Test workflow"
input:
- "a1"
- "a2"
tasks:
  Task1:
    action: "core.noop"
    next:
    - when: "<% succeeded()  %>"
      do: "Task2"
    - when: "<% failed() %>"
      do: "Task2"
  Task2:
    action: "core.noop"
    next:
    - when: "<% succeeded()  %>"
      do: "Task3"
    - when: "<% failed() %>"
      do: "Task3"
  Task3:
    action: "core.noop"
    next:
    - when: "<% succeeded()  %>"
      do: "Task4"
    - when: "<% failed() %>"
      do: "Task4"
  Task4:
    action: "core.noop"
    next:
    - when: "<% succeeded()  %>"
      do: "Task5"
    - when: "<% failed() %>"
      do: "Task5"
  Task5:
    action: "core.noop"
    next:
    - when: "<% failed() %>"
      do: "fail"
CLAassistant commented 1 year ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: guzzijones
:x: Yogesh Kumar


Yogesh Kumar seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

guzzijones commented 1 year ago

This looks good to me.

arm4b commented 1 year ago

@yogeshgoyal26 Looks like we have a Changelog for Orquestra: https://github.com/StackStorm/orquesta/blob/master/CHANGELOG.rst It would be helpful to include a description for this enhancement in there too for completeness.