Join failure within nested workflows can cause Parent workflow to run indefinitely.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by running the parent_wf.yaml and child_wf.yaml reproduction workflows with the documented nested join failure. Trace how the failed child joins are reported to the parent and compare that with the expected completion path; done means the parent reaches complete and a terminal success or failure state instead of remaining running.
Written by the indexing model from the issue text.
Description
Summary
Using a nested workflow, when a join fails due to "unreachable" in the child workflow can cause the parent workflow to run indefinitely, even though the parent workflow reaches an acceptable completion point.
Error Messages
I've seen two cases of error messages when this scenario presents
"message": "UnreachableJoinError: The join task|route \"aggregate|1\" is partially satisfied but unreachable."
"message": "The join task \"aggregate\" is unreachable. A join task is determined to be unreachable if there are nested forks from multi-referenced tasks that join on the said task. This is ambiguous to the workflow engine because it does not know at which level should the join occurs.",
The longest I've seen it go, was until I manually canceled it the following day at 69,552 seconds (over 19 hours)

Environment details
ST2 Version
st2 --version
st2 3.2.0, on Python 2.7.12
Distro
cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.5 LTS"
Other
- Installed from one-liner script
- Using EC2 server, not Docker or other virtualization
- Running on AMI
ami-0e32ec5bc225539f5in AWS
Reproduction Workflow Examples
I have tested with these reproduction workflows that the problem presents itself.
Parent WF
parent_wf.meta.yaml
pack: default
enabled: true
runner_type: orquesta
name: parent_wf
entry_point: workflows/parent_wf.yaml
parent_wf.yaml
version: 1.0
tasks:
# [483, 337]
task1:
action: default.child_wf
with:
items: <% ctx(hosts) %>
concurrency: 3
next:
- do:
- complete
# [483, 486]
complete:
action: core.noop
join: all
vars:
- hosts: ["host1","host2","host3"]
Child WF
child_wf.meta.yaml
pack: default
enabled: true
runner_type: orquesta
name: child_wf
entry_point: workflows/child_wf.yaml
child_wf.yaml
version: 1.0
tasks:
# [489, 163]
run:
action: core.noop
next:
- do:
- succeeds
- fails
# [348, 313]
succeeds:
action: core.local
input:
cmd: echo 'success'
next:
# #1072c6
- do:
- aggregate
# [666, 311]
fails:
action: core.local
input:
cmd: echo 'fail'; exit 1
next:
# #1072c6
- do:
- aggregate
# [518, 461]
aggregate:
action: core.noop
join: all
next:
# #629e47
- do:
- continue_wf
# [518, 593]
continue_wf:
action: core.noop
Expected Result
- Child workflow
joinfails because upstream action failure - Parent Workflow sees failure of child workflow
- Parent Workflow waits for all child workflows to complete
- Parent workflow moves onto
completeaction - Parent workflow enters Success/Failed State accordingly
Observed Result
- Child workflow
joinfails because upstream action failure - Parent Workflow sees failure of child workflow
- Parent Workflow waits for all child workflows to complete
- Parent workflow moves onto
completeaction - Parent workflow continues in
runningState until canceled manually

Workaround
An acceptable workaround I have found is ensuring that each parallel silo (fork) of the child workflow, prior to being joined, has a core.noop to ensure that a success always happens, which allows the join to succeed and continue gracefully.
This causes the "Expected Result" to be observed.
- Dominant language
- Python
- Stars
- 111
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
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.
More from StackStorm/orquesta
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
StackStorm/orquesta#275 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
StackStorm/orquesta#274 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
StackStorm/orquesta#272 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
StackStorm/orquesta#268 ·
-
Vague error Open
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
StackStorm/orquesta#265 · 1 comment ·
All issues in StackStorm/orquesta
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100