mistral/releasenotes/notes/fix_workflow_output-cee5df431679de6b.yaml
Renat Akhmerov dfdff78315 Fix how Mistral calculates workflow output
* Workflow output sometimes is not calculated correctly due to
  the race condition between different transactions: the one that
  checks workflow completion (i.e. calls "check_and_complete") and
  the one that processes action execution completion (i.e. calls
  "on_action_complete"). Calculating output sometimes was based on
  stale data cached by the SQLAlchemy session. To fix this, we just
  need to expire all objects in the session so that they are
  refreshed automatically if we read their state in order to make
  required calculations. See the bug description for more details
  on how the problem was observed.
* Added another test for direct workflow that formally checks
  calculation of workflow output. It doesn't pretend to test the
  aforementioned issue (it can be reproduced only with a big number
  of attempts, and/or under load). It's for the sake of the test
  module completeness.

Change-Id: I4a7e7fd9a4bbb6e93df169b4b40bc2d83ccfce89
Closes-Bug: #1792090
2018-09-12 16:48:43 +07:00

14 lines
620 B
YAML

---
fixes:
- |
Workflow output sometimes was not calculated correctly due to
the race condition between different transactions: the one that
checks workflow completion (i.e. calls "check_and_complete") and
the one that processes action execution completion (i.e. calls
"on_action_complete"). Calculating output sometimes was based on
stale data cached by the SQLAlchemy session. To fix this, we just
need to expire all objects in the session so that they are
refreshed automatically if we read their state in order to make
required calculations. The corresponding change was made.