StackStorm / StackStorm/st2

Feature request: safety mechanisms to prevent indefinite loops in workflows

Open
#2,224 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

Hello,

It'd be nice to have some kind of a safety mechanism. Let's say we define something like max-executions: 1 in the action and some mechanism makes sure that this particular action is not executed more than once.

Image of a workflow

So if for some reason create_flavor action exits with 0 code (success), but in reality flavor is not created, and check_flavor fails, it will end up looping indefinitely (until overall timeout of the workflow is not reached).

I tried with retry count:1 delay:1, looks like it doesn't help in this case.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the workflow execution and retry behavior described for the create_flavor and check_flavor actions. Determine how execution limits would interact with retries and the overall workflow timeout. Done means a workflow cannot loop indefinitely when an action reports success but the subsequent check fails.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.