Fixing engine transaction model and error handling
* Transaction in on_action_complete() must not be splitted into 2 parts,
it caused the bug with after task completion logic
* Fix executor behavior so that it doesn't send an error back to engine
if a error came from engine itself. It should report back only errors
occurred with an action itself.
* YAQL and other expected Mistral exceptions in transitions should not
lead to transaction rollback and rollback of action result. For example
if action result came and it's valid but while evaluating transition
conditions we got a YAQL exception then action result should be stored
normally w/o transaction rollback and corresponding task and workflow
should fail with corresponding state_info.
* Fixed all tests
* Minor cosmetic changes
Closes-Bug: #1524477
Change-Id: I09086e40a5902bbb6c977bf195cb035e31f21246
(cherry picked from commit ad07ba0d68836ab0409fb51d235def653143cd2c)
Reviewed: https:/ /review. openstack. org/299751 /git.openstack. org/cgit/ openstack/ mistral/ commit/ ?id=a3ff23cfffb 14331bb6304f30b b53666e2351943
Committed: https:/
Submitter: Jenkins
Branch: stable/mitaka
commit a3ff23cfffb1433 1bb6304f30bb536 66e2351943
Author: Renat Akhmerov <email address hidden>
Date: Mon Mar 28 13:44:54 2016 +0600
Fixing engine transaction model and error handling
* Transaction in on_action_ complete( ) must not be splitted into 2 parts,
it caused the bug with after task completion logic
* Fix executor behavior so that it doesn't send an error back to engine
if a error came from engine itself. It should report back only errors
occurred with an action itself.
* YAQL and other expected Mistral exceptions in transitions should not
lead to transaction rollback and rollback of action result. For example
if action result came and it's valid but while evaluating transition
conditions we got a YAQL exception then action result should be stored
normally w/o transaction rollback and corresponding task and workflow
should fail with corresponding state_info.
* Fixed all tests
* Minor cosmetic changes
Closes-Bug: #1524477
Change-Id: I09086e40a5902b bb6c977bf195cb0 35e31f21246 0409fb51d235def 653143cd2c)
(cherry picked from commit ad07ba0d68836ab