StackStorm / StackStorm/orquesta
Retries using with-items runs a retry even on objects that succeeded as well
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 111
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
We use the with-items to loop over and run an action.
If it fails for even one of them, it retries over all the items in the array again, instead of just retrying the failed ones.
For instance, if param1 was set to 1,2,3,4 in the below sample workflow:
version: 1.0
description: Test retry workflow
input:
- param1
- slack_channel
tasks:
split_list:
action: core.noop
next:
- when: <% succeeded() %>
do: print_val
publish:
- list_vals: <% ctx(param1).split(',') %>
print_val:
with: <% ctx(list_vals) %>
action: core.local
input :
cmd : >
val=<% item() %>;
if [ $val -eq 2 ];then exit -1;fi
retry:
when: <% failed() %>
count: 5
delay: 2
next:
- when: <% succeeded() %>
publish:
- status: "SUCCESS"
- when: <% failed() %>
do:
- send_failed_alert
publish:
- status: "FAILED"
send_failed_alert:
action: slack.chat.postMessage
input:
channel: "#<% ctx(slack_channel) %>"
text: "ERROR: failed on param <% ctx(param1) %> failed"`
And here is the output of the run.

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the supplied YAML workflow with param1 set to 1,2,3,4 and observe the retry behavior for the with-items action. Trace the retry and item-execution paths to determine why successful items run again; done means retries are limited to failed items while the reproduced workflow still reports the expected statuses.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100