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

Prevent infinite loops in Flows #17550

Open
3 tasks done
alexvdvalk opened this issue Feb 16, 2023 · 4 comments
Open
3 tasks done

Prevent infinite loops in Flows #17550

alexvdvalk opened this issue Feb 16, 2023 · 4 comments

Comments

@alexvdvalk
Copy link
Contributor

alexvdvalk commented Feb 16, 2023

Checklist

Describe the Bug

I'm using community cloud. ~ v 9.21.2

When a flow is created using the Event Hook trigger, with "create" scope and includes the Directus Activity table, a infinite loop is created, because records are created in that table when ever flows are executed.

The outcome is the project eventually crashes.

There are similar issues discussed but I don't see a use case where a flow should execute based on the "Directus Activity" table as it would always create an infinite loop.

To Reproduce

Create Flow.
Trigger: "Event Hook"
Type: "Action"
Scope: "Create, Update"
Collections: Directus Activity and Any other

Once this flow is triggered, it will continue executing until the project crashes. The flow then needs to be removed immediately otherwise the infinite loop begins again.

Hosting Strategy

Directus Cloud

@github-actions
Copy link

Linear: ENG-707

@br41nslug
Copy link
Member

Infinite loops are not something we can completely prevent however you can prevent this by disabling the activity tracking for the flow that is watching that collection
image

@alexvdvalk
Copy link
Contributor Author

Not sure if this can be classed as a bug but it's worth noting is somewhere.

@BlackDahlia313
Copy link
Contributor

Just experienced this myself and had no clue until I tracked it down to me not completing a flow. It actually broke DO App service. They had to manually reset a service. 🥼

@rijkvanzanten rijkvanzanten removed their assignment Sep 21, 2023
@rijkvanzanten rijkvanzanten changed the title Flows - Infinite loop. Event Hook on Directus Flows table Prevent infinite loops in Flows Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📋 Backlog
Development

No branches or pull requests

5 participants