Add new engine command named "continue" #172
Merged
Conversation
Add a new engine command named "continue". Previously, the default value when `do` is not specified is `noop`. When the previous task state is one of the failure states, noop will be assumed as remediation and the workflow execution will succeed. With `continue`, it will be replaced as the default value when `do` is not specified. The workflow engine will not alter the previous task state and will continue to conduct the workflow execution. If the previous task state is one of the failure states, the conductor will continue and fail the workflow execution.
Add unit test to make sure when "do" is not specified and the task failed, the workflow execution will continue with failure.
The `continue` engine command replaces `noop` as default value when `do` is not specified. Replace `noop` with `continue` in the expected task sequence.
Add the `continue` command to the list of engine commands. Update the description to explain the difference between `noop` and `continue`.
jinpingh
reviewed
Jul 23, 2019
Contributor
jinpingh
left a comment
There was a problem hiding this comment.
This is a new behavior for orquesta workflow, is there a plan to create new example workflow and integration testcase in st2?
blag
suggested changes
Jul 23, 2019
Contributor
blag
left a comment
There was a problem hiding this comment.
Looks good, but (AIUI) it needs an additional test for noop transitions, and a few other small tweaks.
ba37202 to
c8ad8fd
Compare
Codecov Report
@@ Coverage Diff @@
## master #172 +/- ##
==========================================
+ Coverage 94.22% 94.25% +0.02%
==========================================
Files 40 40
Lines 2461 2470 +9
Branches 470 471 +1
==========================================
+ Hits 2319 2328 +9
Misses 84 84
Partials 58 58
Continue to review full report at Codecov.
|
Collaborator
Author
Add more workflow examples to illustrate the use of continue, noop, and the fail engine commands.
Add unit tests to cover various error handling use cases with continue, noop, and fail engine commands.
blag
approved these changes
Jul 24, 2019
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 new engine command named "continue". Previously, the default value when
dois not specified isnoop. When the previous task state is one of the failure states, noop will be assumed as remediation and the workflow execution will succeed. Instead of changing the behavior ofnoop, introduce a new command namedcontinue. Withcontinue, it will be replaced as the default value whendois not specified. The workflow engine will not alter the previous task state and will continue to conduct the workflow execution. If the previous task state is one of the failure states, the conductor will continue and fail the workflow execution. Fixes StackStorm/st2#4740.