Tasks that have join: all and retry may still execute if upstream tasks fail
I ran the attached workflow in a docker image generated from tools/docker/Dockerfile in mistral 5.2.0. Note that the "joined_retry" task transitions from the DELAYED state to the SUCCESS state. If you remove the retry block, this task goes directly to FAILED. In that case it is not triggered by the later job and it does not publish output.
root@f316915139b2:~# mistral workflow-create retry_join.yml
+--------------------------------------+------------+-------------------+--------+-------+---------------------+------------+
| ID | Name | Project ID | Tags | Input | Created at | Updated at |
+--------------------------------------+------------+-------------------+--------+-------+---------------------+------------+
| 677cf5e7-d6fb-4588-91c6-2b7a24a50a0c | join_retry | <default-project> | <none> | | 2018-01-16 20:01:46 | None |
+--------------------------------------+------------+-------------------+--------+-------+---------------------+------------+
root@f316915139b2:~# mistral execution-create join_retry
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| ID | 1b040121-6764-4a83-9b52-4d664fc4c870 |
| Workflow ID | 677cf5e7-d6fb-4588-91c6-2b7a24a50a0c |
| Workflow name | join_retry |
| Description | |
| Task Execution ID | <none> |
| State | RUNNING |
| State info | None |
| Created at | 2018-01-16 20:02:07 |
| Updated at | 2018-01-16 20:02:07 |
+-------------------+--------------------------------------+
root@f316915139b2:~# mistral task-list 1b040121-6764-4a83-9b52-4d664fc4c870
mistral +--------------------------------------+--------------+---------------+--------------------------------------+---------+------------------------------+---------------------+---------------------+
| ID | Name | Workflow name | Execution ID | State | State info | Created at | Updated at |
+--------------------------------------+--------------+---------------+--------------------------------------+---------+------------------------------+---------------------+---------------------+
| 0e92c24d-342c-47ae-a9db-270d917b5dfb | succeed | join_retry | 1b040121-6764-4a83-9b52-4d664fc4c870 | SUCCESS | None | 2018-01-16 20:02:07 | 2018-01-16 20:02:17 |
| 4d05fd8a-be21-4b0a-8719-9d5c3d7f56ec | failure | join_retry | 1b040121-6764-4a83-9b52-4d664fc4c870 | ERROR | Failed to run action [act... | 2018-01-16 20:02:07 | 2018-01-16 20:02:18 |
| eff3aabd-61fb-456e-aa88-c8220c90f8f0 | joined_retry | join_retry | 1b040121-6764-4a83-9b52-4d664fc4c870 | WAITING | Task is waiting. | 2018-01-16 20:02:17 | <none> |
+--------------------------------------+--------------+---------------+--------------------------------------+---------+------------------------------+---------------------+---------------------+
root@f316915139b2:~# mistral task-list 1b040121-6764-4a83-9b52-4d664fc4c870
+--------------------------------------+--------------+---------------+--------------------------------------+---------+------------------------------+---------------------+---------------------+
| ID | Name | Workflow name | Execution ID | State | State info | Created at | Updated at |
+--------------------------------------+--------------+---------------+--------------------------------------+---------+------------------------------+---------------------+---------------------+
| 0e92c24d-342c-47ae-a9db-270d917b5dfb | succeed | join_retry | 1b040121-6764-4a83-9b52-4d664fc4c870 | SUCCESS | None | 2018-01-16 20:02:07 | 2018-01-16 20:02:17 |
| 4d05fd8a-be21-4b0a-8719-9d5c3d7f56ec | failure | join_retry | 1b040121-6764-4a83-9b52-4d664fc4c870 | ERROR | Failed to run action [act... | 2018-01-16 20:02:07 | 2018-01-16 20:02:18 |
| eff3aabd-61fb-456e-aa88-c8220c90f8f0 | joined_retry | join_retry | 1b040121-6764-4a83-9b52-4d664fc4c870 | SUCCESS | None | 2018-01-16 20:02:17 | 2018-01-16 20:02:20 |
+--------------------------------------+--------------+---------------+--------------------------------------+---------+------------------------------+---------------------+---------------------+
root@f316915139b2:~# mistral execution-get-output 1b040121-6764-4a83-9b52-4d664fc4c870
{
"ok": "ok",
"result": "Failure caused by error in tasks: failure\n\n failure [task_ex_id=4d05fd8a-be21-4b0a-8719-9d5c3d7f56ec] -> Failed to run action [action_ex_id=a1232435-e03b-404d-872f-8a0b8e6f9417, action_cls='<class 'mistral.actions.action_factory.JavaScriptAction'>', attributes='{}', params='{u'script': u'throw \"failed immediately\"\\n'}']\n JavaScriptAction failed: failed immediately\n [action_ex_id=a1232435-e03b-404d-872f-8a0b8e6f9417, idx=0]: Failed to run action [action_ex_id=a1232435-e03b-404d-872f-8a0b8e6f9417, action_cls='<class 'mistral.actions.action_factory.JavaScriptAction'>', attributes='{}', params='{u'script': u'throw \"failed immediately\"\\n'}']\n JavaScriptAction failed: failed immediately\n"
}
Fix proposed to branch: master /review. openstack. org/586914
Review: https:/