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
Cascade terminate/Purge Workflow Support #7340
Cascade terminate/Purge Workflow Support #7340
Conversation
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
LGTM but all builds are failing |
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #7340 +/- ##
==========================================
+ Coverage 62.32% 62.35% +0.02%
==========================================
Files 240 240
Lines 22055 22075 +20
==========================================
+ Hits 13746 13765 +19
- Misses 7156 7158 +2
+ Partials 1153 1152 -1 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Should pass now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
@cgillum Do we need the API to have cascade terminate by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only question about this PR is whether we can make the parameter name be recursive
instead of non_recursive
. I understand that we like to default Boolean parameter values to false
, but I wonder if it would actually be better to name the query string parameter to recursive
and default its value to true
.
@@ -99,6 +99,7 @@ const ( | |||
workflowComponent = "workflowComponent" | |||
workflowName = "workflowName" | |||
instanceID = "instanceID" | |||
nonRecursive = "non_recursive" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this recursive
instead of non_recursive
? It's harder for people to understand negatives.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the only concern I have here is, in general query string default parameters when not specified are the default values like false, 0 etc.
By defaulting to recursive terminate/purge and then asking users to set ?recursive=false
does not seem intuitive to me, rather at that point setting ?non_recursive=true
make it more intuitive IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kind of incline towards recursive
set to true
by default. Understanding this was quite easier for me.
Is there any reasoning behind keeping all flags to false by default, apart from general practice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally agree with Mukundan that it's more intuitive when the default value of a boolean is false.
If the default value is "true", then you are introducing 3 states: set true, set false, null.
func (*ActorBackend) GetOrchestrationRuntimeState(context.Context, *backend.OrchestrationWorkItem) (*backend.OrchestrationRuntimeState, error) { | ||
return nil, errors.New("not supported") | ||
func (abe *ActorBackend) GetOrchestrationRuntimeState(ctx context.Context, owi *backend.OrchestrationWorkItem) (*backend.OrchestrationRuntimeState, error) { | ||
state, err := LoadWorkflowState(ctx, abe.actorRuntime, string(owi.InstanceID), abe.config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any particular reason for implementing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cgillum this is required for cascade purge: we need to get list of sub-orchestrations to purge: https://github.com/microsoft/durabletask-go/blob/b58abfd02e48667ae6d8622de1531b322178b8b9/backend/backend.go#L135
* Updating protos Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * enable recursive terminate/purge Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Updating dtf-go Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * updating contrib Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Correct proto generated files Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * update comment Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * implementing getOrchestrationRuntimeState Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Adding unit tests Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * make modtidy-all Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Adding recursive option in query parameter Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Adding integration test for workflow Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * fix bug in Creating sub-orchestrations Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Setting recursive/terminate purge to default and adding tests for same Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * linter fixes Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Removing fix from this PR Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * renaming to Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * linter fixes Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> --------- Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com> Co-authored-by: Loong Dai <long.dai@intel.com> Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com> Signed-off-by: Viktor Subota <viktor.subota@c.delinea.com>
* Cascade terminate/Purge Workflow Support (#7340) * Updating protos Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * enable recursive terminate/purge Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Updating dtf-go Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * updating contrib Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Correct proto generated files Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * update comment Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * implementing getOrchestrationRuntimeState Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Adding unit tests Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * make modtidy-all Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Adding recursive option in query parameter Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Adding integration test for workflow Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * fix bug in Creating sub-orchestrations Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Setting recursive/terminate purge to default and adding tests for same Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * linter fixes Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Removing fix from this PR Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * renaming to Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * linter fixes Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> --------- Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com> Co-authored-by: Loong Dai <long.dai@intel.com> Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com> Signed-off-by: Viktor Subota <viktor.subota@c.delinea.com> * Add priorityClassName parameter to Helm chart Signed-off-by: Viktor Subota <viktor.subota@c.delinea.com> * Add priorityClassName to README doc Signed-off-by: Viktor Subota <viktor.subota@c.delinea.com> --------- Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> Signed-off-by: Viktor Subota <viktor.subota@c.delinea.com> Co-authored-by: Shivam Kumar <shivamkm07@gmail.com> Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com> Co-authored-by: Loong Dai <long.dai@intel.com> Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com> Co-authored-by: Viktor Subota <viktor.subota@c.delinea.com>
* Updating protos Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * enable recursive terminate/purge Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Updating dtf-go Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * updating contrib Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Correct proto generated files Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * update comment Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * implementing getOrchestrationRuntimeState Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Adding unit tests Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * make modtidy-all Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Adding recursive option in query parameter Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Adding integration test for workflow Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * fix bug in Creating sub-orchestrations Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Setting recursive/terminate purge to default and adding tests for same Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * linter fixes Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Removing fix from this PR Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * renaming to Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * linter fixes Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> --------- Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com> Co-authored-by: Loong Dai <long.dai@intel.com> Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
* Cascade terminate/Purge Workflow Support (dapr#7340) * Updating protos Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * enable recursive terminate/purge Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Updating dtf-go Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * updating contrib Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Correct proto generated files Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * update comment Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * implementing getOrchestrationRuntimeState Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Adding unit tests Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * make modtidy-all Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Adding recursive option in query parameter Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Adding integration test for workflow Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * fix bug in Creating sub-orchestrations Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Setting recursive/terminate purge to default and adding tests for same Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * linter fixes Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Removing fix from this PR Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * renaming to Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * linter fixes Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> --------- Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com> Co-authored-by: Loong Dai <long.dai@intel.com> Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com> Signed-off-by: Viktor Subota <viktor.subota@c.delinea.com> * Add priorityClassName parameter to Helm chart Signed-off-by: Viktor Subota <viktor.subota@c.delinea.com> * Add priorityClassName to README doc Signed-off-by: Viktor Subota <viktor.subota@c.delinea.com> --------- Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> Signed-off-by: Viktor Subota <viktor.subota@c.delinea.com> Co-authored-by: Shivam Kumar <shivamkm07@gmail.com> Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com> Co-authored-by: Loong Dai <long.dai@intel.com> Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com> Co-authored-by: Viktor Subota <viktor.subota@c.delinea.com>
* Cascade terminate/Purge Workflow Support (dapr#7340) * Updating protos Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * enable recursive terminate/purge Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Updating dtf-go Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * updating contrib Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Correct proto generated files Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * update comment Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * implementing getOrchestrationRuntimeState Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Adding unit tests Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * make modtidy-all Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Adding recursive option in query parameter Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Adding integration test for workflow Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * fix bug in Creating sub-orchestrations Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Setting recursive/terminate purge to default and adding tests for same Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * linter fixes Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Removing fix from this PR Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * renaming to Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * linter fixes Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> --------- Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com> Co-authored-by: Loong Dai <long.dai@intel.com> Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com> Signed-off-by: Viktor Subota <viktor.subota@c.delinea.com> * Add priorityClassName parameter to Helm chart Signed-off-by: Viktor Subota <viktor.subota@c.delinea.com> * Add priorityClassName to README doc Signed-off-by: Viktor Subota <viktor.subota@c.delinea.com> --------- Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> Signed-off-by: Viktor Subota <viktor.subota@c.delinea.com> Co-authored-by: Shivam Kumar <shivamkm07@gmail.com> Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com> Co-authored-by: Loong Dai <long.dai@intel.com> Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com> Co-authored-by: Viktor Subota <viktor.subota@c.delinea.com>
* Cascade terminate/Purge Workflow Support (dapr#7340) * Updating protos Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * enable recursive terminate/purge Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Updating dtf-go Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * updating contrib Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Correct proto generated files Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * update comment Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * implementing getOrchestrationRuntimeState Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Adding unit tests Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * make modtidy-all Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Adding recursive option in query parameter Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Adding integration test for workflow Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * fix bug in Creating sub-orchestrations Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Setting recursive/terminate purge to default and adding tests for same Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * linter fixes Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * Removing fix from this PR Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * renaming to Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> * linter fixes Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> --------- Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com> Co-authored-by: Loong Dai <long.dai@intel.com> Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com> Signed-off-by: Viktor Subota <viktor.subota@c.delinea.com> * Add priorityClassName parameter to Helm chart Signed-off-by: Viktor Subota <viktor.subota@c.delinea.com> * Add priorityClassName to README doc Signed-off-by: Viktor Subota <viktor.subota@c.delinea.com> --------- Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> Signed-off-by: Viktor Subota <viktor.subota@c.delinea.com> Co-authored-by: Shivam Kumar <shivamkm07@gmail.com> Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com> Co-authored-by: Loong Dai <long.dai@intel.com> Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com> Co-authored-by: Viktor Subota <viktor.subota@c.delinea.com> Signed-off-by: Elena Kolevska <elena@kolevska.com>
Description
Support for cascade terminate/purge was added in DTF-Go: microsoft/durabletask-go#47.
This PR adds the support for the same in Dapr. Also it makes the cascade feature default i.e. when no option is provided, it would assume cascade terminate/purge
true
The related components-contrib PR is dapr/components-contrib#3296Issue reference
Please reference the issue this PR will close: #[issue number]
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: