inaccurate task state on yaql error during task transition
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mistral |
Fix Released
|
High
|
Winson Chan |
Bug Description
Given the following workflow with an async task1, if the task1 state is updated to SUCCESS thru the action execution API (since it's an async task), the YAQL error in task2 input will lead to the WF execution in ERROR and task1 in RUNNING.
wf:
type: direct
tasks:
task1:
action: std.async_noop
on-complete
- task2
task2:
action: std.echo output=<% wrong(yaql) %>
Given similar workflow but all tasks are sync, on task1 completion, the WF execution will be in ERROR and task1 will be in ERROR. Task1 has successfully completed and should be marked SUCCESS.
wf:
type: direct
tasks:
task1:
action: std.noop
on-complete
- task2
task2:
action: std.echo output=<% wrong(yaql) %>
Changed in mistral: | |
assignee: | nobody → Winson Chan (winson-c-chan) |
Changed in mistral: | |
milestone: | none → mitaka-1 |
importance: | Undecided → High |
status: | New → Triaged |
Changed in mistral: | |
status: | Triaged → In Progress |
Changed in mistral: | |
milestone: | mitaka-1 → 2.0.0 |
Reviewed: https:/ /review. openstack. org/239793 /git.openstack. org/cgit/ openstack/ mistral/ commit/ ?id=93b19335f59 92f74ac0edcd4f9 5c0ad06d101b74
Committed: https:/
Submitter: Jenkins
Branch: master
commit 93b19335f5992f7 4ac0edcd4f95c0a d06d101b74
Author: Winson Chan <email address hidden>
Date: Wed Oct 28 02:18:22 2015 +0000
Fix state change on exception during task state change
If there is an exception during on_task_ state_change, particularly if
there is a YAQL evaluation error in the input of the next task, the state
of the current task and related action execution will be marked ERROR for
sync task and rolled back for async task, leaving the task as orphaned in
RUNNING state in most cases. This is a workflow handling error and the
workflow execution state is already marked ERROR. The state of the current
task execution should not be affected.
Change-Id: Id28b0661c09efa 80a666d9eb7606f b435641a989
Closes-Bug: #1510738