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

Don't repeatedly traverse workflow nodes when finding ancestors #12156

Merged
merged 1 commit into from
May 10, 2022

Conversation

mabashian
Copy link
Member

SUMMARY

In this function: https://github.com/ansible/awx/blob/devel/awx/ui/src/components/Workflow/workflowReducer.js#L535-L584 we go through and mark ancestor nodes as disabled to prevent users from building a workflow with a cycle in it. If you build a workflow with a sufficiently large number of paths back to the start node and then attempt to link one of the very end nodes with another, the visualizer will crash (due to long running recursion).

To fix this, I've marked nodes as "already traversed" to prevent us from traversing the same paths over and over.

happy_wf

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
  • UI

@jay-steurer jay-steurer merged commit e87c121 into ansible:devel May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants