Repository navigation
Fix workflow service to handle coordinator and database errors - #4711
Merged
Merged
Conversation
Refactor orquesta unit test test_error_handling to inherit from WorkflowTestCase. Move the sort_wf_runtime_errors function to WorkflowTestCase.
m4dcoder
force-pushed
the
orquesta-unhandled-errors
branch
from
June 13, 2019 22:40
43e9e03 to
33555e1
Compare
Add a check to ensure the scheduled items are in running state before canceling the execution. Otherwise, there could be a race where one of the item is not running and the status will be canceled instead of succeeded.
Add a separate retry decorator to handle coordinator and database connection errors different than the retry decorator for database write conflicts. Include the retry decorator at appropriate locations. Add unit tests to test recovery from connection errors and when retries are exhausted.
Ran make configgen to update the sample st2 config file to include the new workflow_engine options.
There is a conflict in registering config options in packs tests with the change in when test configs are parsed in st2tests.base. Add a config reset in st2tests.base after st2common modules are loaded to avoid the conflict.
m4dcoder
force-pushed
the
orquesta-unhandled-errors
branch
from
June 14, 2019 00:44
33555e1 to
0e437ec
Compare
When the process method of workflow engine failed with an unexpected error, catch the exception and fail the workflow execution.
Add jitter argument to the decorator for retrying from database write conflicts.
Add a step in the garbage collector to look for workflow orphans, workflow execution that has running status but have been idled without any task executions for some time. The garbage collector will cancel these workflow executions. Add unit tests to make sure records are identified and canceled correctly.
m4dcoder
force-pushed
the
orquesta-unhandled-errors
branch
from
June 17, 2019 23:11
8622fbd to
89fb1b5
Compare
Use an indexed attribute workflow_execution instead of the workflow execution under the context. The fix uncovered other errors with client side sorting of the result. The fix for these errors are included.
Fix minor issue with use of the sorted method where the name of the "key" argument is not provided in the method call.
If the message type is ActionExecutionDB and there is an exception on processing the message in the workflow engine, then fail the task execution associated with the action execution. This sets up the workflow execution to be able to rerun from failed task(s).
Add changelog entry for the workflow service fix to handle unexpected coordinator and database errors.
blag
reviewed
Jun 19, 2019
blag
approved these changes
Jun 19, 2019
Clean up and normalize the log messages and how they are coded in the garbage collector.
Member
|
Identified in internal st2cicd e2e tests infra. With this newly introduced feature and default like: we're now marking long running orchestra workflows as This is pretty much a serious regression in just released |
Member
|
Addressed via #4733 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a separate retry decorator to handle coordinator and database connection errors different than the retry decorator for database write conflicts. Include the retry decorator at appropriate locations. The exception is raised again when retries are exhausted and the workflow engine process method catches the exception and fails the workflow execution. Add unit tests to test recovery from connection errors and when retries are exhausted. If the environmental errors persist and the workflow engine is unable to record the failed status for the workflow, add a garbage collection routine to cleanup these cases. Fixes #4704 and #4705.