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

Improve inspect context and detect undefined task logic. #254

Merged
merged 6 commits into from
Sep 13, 2024

Conversation

yogeshgoyal26
Copy link

@yogeshgoyal26 yogeshgoyal26 commented Jun 6, 2023

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
Copy link

CLAassistant commented Jun 6, 2023

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.

✅ guzzijones
❌ 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
Copy link
Contributor

This looks good to me.

@guzzijones guzzijones self-requested a review July 9, 2023 15:14
Copy link
Contributor

@guzzijones guzzijones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 from me. This is a great find. n^2 complexity fix.

@guzzijones guzzijones self-assigned this Jul 9, 2023
@guzzijones guzzijones added the bug label Jul 9, 2023
@yogeshgoyal26 yogeshgoyal26 changed the title Improve inspect context and detect undefined task logic Improve inspect context and detect undefined task logic. Jul 10, 2023
@yogeshgoyal26 yogeshgoyal26 reopened this Jul 10, 2023
@arm4b
Copy link
Member

arm4b commented Jul 11, 2023

@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.

@guzzijones guzzijones merged commit 5ba1467 into StackStorm:master Sep 13, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants