8000 Add new engine command named "continue" by m4dcoder · Pull Request #172 · StackStorm/orquesta · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add new engine command named "continue" #172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 24, 2019
Merged

Add new engine command named "continue" #172

merged 7 commits into from
Jul 24, 2019

Conversation

m4dcoder
Copy link
Collaborator

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. Instead of changing the behavior of noop, introduce a new command named continue. 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. Fixes StackStorm/st2#4740.

m4dcoder added 4 commits July 23, 2019 13:34
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 en
8000
gine 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`.
@m4dcoder m4dcoder requested review from jinpingh and blag July 23, 2019 20:53
Copy link
Contributor
@jinpingh jinpingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new behavior for orquesta workflow, is there a plan to create new example workflow and integration testcase in st2?

Copy link
Contributor
@blag blag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but (AIUI) it needs an additional test for noop transitions, and a few other small tweaks.

@codecov-io
Copy link
codecov-io commented Jul 23, 2019

Codecov Report

Merging #172 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
orquesta/machines.py 87.86% <ø> (ø) ⬆️
orquesta/conducting.py 93.45% <100%> (+0.02%) ⬆️
orquesta/events.py 100% <100%> (ø) ⬆️
orquesta/specs/native/v1/models.py 97.92% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8d5378...d958d68. Read the comment docs.

@m4dcoder
Copy link
Collaborator Author

@jinpingh There's unit test at one of the commits here. The continue command is added by default to a transition where do is empty. f5934f1.

m4dcoder added 2 commits July 23, 2019 16:43
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.
Copy link
Contributor
@jinpingh jinpingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@m4dcoder m4dcoder requested a review from blag July 24, 2019 15:38
@m4dcoder m4dcoder merged commit 224c1a5 into master Jul 24, 2019
@m4dcoder m4dcoder deleted the task-remediation branch July 24, 2019 17:5 7CBD 8
@m4dcoder m4dcoder self-assigned this Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Orquesta workflows have incorrect status
4 participants
0