StackStorm / StackStorm/st2

workflow doesn't go ahead next item in case of concurrency: 1

Open
#6,234 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug status:to be verified
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

Discussed in https://github.com/StackStorm/st2/discussions/6232

Originally posted by freeyssu September 3, 2024
I usually use with - items statement for parallel process.
I found out that a failed job with concurrency: 1 config causes that task is termiated immediately even though uncompleted items in loop still remains.

This is my sampe code.
When svr1 is failed with concurrency: 1, the workflow doesn 't run the action for the remained 2 items svr2 and svr3. My expectation is that the task completes all 3 items in loop and then mark FAIL result as the first item is failed.
In case of concurrency: 2 or having bigger value, the workflow executes all 3 items and then marks task FAIL result. This is what I expected.

vars
  - servers: ["svr1", "svr2", "svr3"]

task:
    with:
      items: target_server in <% ctx(servers) %>
      concurrency: 1
    action: pack.action    
    next:
      ....
```</div>

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 reproducing the provided with-items workflow with servers svr1, svr2, and svr3 and concurrency: 1, then trace the workflow task execution path for failed items and concurrency handling. Done means the remaining items still run after the first failure and the task finishes with a failed result; compare this with the existing concurrency: 2 behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.