Published vars lost for complex parallel join
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mistral |
Confirmed
|
High
|
Renat Akhmerov | ||
Liberty |
Won't Fix
|
High
|
Renat Akhmerov | ||
Mitaka |
Won't Fix
|
High
|
Renat Akhmerov |
Bug Description
The sample WF below have two parallel branches. I'm expecting output to be the following where the vars are true. However, the join task named "done" following completion of the parallel branches are not executed. But the WF execution reported SUCCESS.
EXPECTED:
{
"is_done": true,
"var1": true,
"var2": true
}
ACTUAL:
~$ cat ~/tmp/test-
version: '2.0'
name: test-complex-join
workflows:
main:
type: direct
output:
var1: <% $.var1 %>
var2: <% $.var2 %>
tasks:
init:
done:
work:
type: direct
tasks:
do:
exit:
~$ mistral workbook-create ~/tmp/test-
Starting new HTTP connection (1): localhost
+------
| Field | Value |
+------
| Name | test-complex-join |
| Tags | <none> |
| Created at | 2015-02-22 23:08:19.190381 |
| Updated at | None |
+------
~$ mistral execution-create test-complex-
Starting new HTTP connection (1): localhost
+------
| Field | Value |
+------
| ID | e96f5f2a-
| Workflow | test-complex-
| State | RUNNING |
| Created at | 2015-02-
| Updated at | 2015-02-
+------
~$ mistral execution-list
Starting new HTTP connection (1): localhost
+------
| ID | Workflow | State | Created at | Updated at |
+------
| e96f5f2a-
| c9517936-
+------
~$ mistral task-list
Starting new HTTP connection (1): localhost
+------
| ID | Name | Workflow name | Execution ID | State |
+------
| 391dc013-
| 022863d8-
| 0f883ca8-
| f643284d-
| cd97ce7e-
+------
~$ mistral execution-
Starting new HTTP connection (1): localhost
{
"is_done": false,
"var1": true,
"var2": false
}
description: | updated |
description: | updated |
Changed in mistral: | |
importance: | Undecided → High |
milestone: | none → kilo-3 |
assignee: | nobody → Nikolay Makhotkin (nmakhotkin) |
no longer affects: | mistral/kilo |
no longer affects: | mistral |
Changed in mistral: | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Renat Akhmerov (rakhmerov) |
Changed in mistral: | |
milestone: | newton-1 → newton-2 |
Changed in mistral: | |
milestone: | newton-2 → newton-3 |
Changed in mistral: | |
milestone: | newton-3 → ocata-1 |
Changed in mistral: | |
milestone: | ocata-1 → ocata-3 |
Changed in mistral: | |
milestone: | ocata-3 → none |
Please note the WF is slightly different. This is another bug. There's a race condition on publishing vars. Whereas the one above failed to execute the join task.
EXPECTED:
{
"is_done": true,
"var1": true,
"var2": true
}
ACTUAL:
{
"is_done": true,
"var1": false,
"var2": true
}
~/st2$ cat ~/tmp/test- complex- join.yaml
version: '2.0'
name: test-complex-join
workflows:
main:
is_ done: <% $.is_done %>
publish:
var1: false
var2: false
is_ done: false
policies:
wait- after: 1
on-success:
- branch1
- branch2
branch1:
workflow: work
publish:
var1: true
policies:
retry:
count: 10
delay: 2
on-success:
- done
branch2:
publish:
var2: true
on-success:
- done
join: all
publish:
is_ done: true
type: direct
output:
var1: <% $.var1 %>
var2: <% $.var2 %>
tasks:
init:
done:
work:
action: std.echo output="Doing..."
on-success:
- exit
action: std.echo output="Exiting..."
type: direct
tasks:
do:
exit:
~$ mistral workbook-create ~/tmp/test- complex- join.yaml ------+ ------- ------- ------- ------- + ------+ ------- ------- ------- ------- + ------+ ------- ------- ------- ------- +
Starting new HTTP connection (1): localhost
+------
| Field | Value |
+------
| Name | test-complex-join |
| Tags | <none> |
| Created at | 2015-02-22 23:15:42.201216 |
| Updated at | None |
+------
~$ mistral execution-create test-complex- join.main ------+ ------- ------- ------- ------- ------- ---+ ------+ ------- ------- ------- ------- ------- ---+ 02c3-4991- 903e-0a2619419a 2d | join.main | 22T23:15: 52.054730 | 22T23:15: 52.081809 | ------+ ------- ------- ------- ------- ------- ---+
Starting new HTTP connection (1): localhost
+------
| Field | Value |
+------
| ID | 95b37c87-
| Workflow | test-complex-
| State | RUNNING |
| Created at | 2015-02-
| Updated at | 2015-02-
+------
~$ mistral execution-list ------- ------- ------- ------- ----+-- ------- ------- ------- -+----- ----+-- ------- ------- -----+- ------- ------- ------+ ------- ------- ------- ------- ----+-- ------- ------- ------- -+----- ----+-- ------- ------- -----+- ------- ------- ------+ 02c3-4991- 903e-0a2619419a 2d | test-complex- join.main | SUCCESS | 2015-02-22 23:15:52 | 2015-02-22 23:15:54 |
Starting new HTTP connection (1): localhost
+------
| ID | Workflow | State | Created at | Updated at |
+------
| 95b37c87-
| 1f...