Cascade terminate/purge support in GrpcDurableTaskClient#262
Merged
jviau merged 12 commits intomicrosoft:mainfrom Feb 2, 2024
Merged
Cascade terminate/purge support in GrpcDurableTaskClient#262jviau merged 12 commits intomicrosoft:mainfrom
jviau merged 12 commits intomicrosoft:mainfrom
Conversation
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
jviau
reviewed
Jan 25, 2024
Member
There was a problem hiding this comment.
As we now have multiple parameters for terminate, I recommend we do the following:
- Add
TerminateInstanceOptions - Make the current
abstractmethodvirtual. Default implementation will call one of the new methods we add. - Add
TerminateInstanceOptionsacceptingvirtualmethods - Update our clients to override the new options-receiving method.
/// add xmldoc
public record TerminateInstanceOptions
{
public object? Output { get; init; }
public bool Recursive { get; init; }
}new methods:
public virtual Task TerminateInstanceAsync(string instanceId, TerminateInstanceOptions? options, CancellationToken cancellation)
=> throw new NotSupportedException($"{this.GetType()} does not support orchestration termination.");
// this is the formerly abstract method
public virtual Task TerminateInstanceAsync(string instanceId, object? output = null, CancellationToken cancellation = default)
{
TerminateInstanceOptions? options = output is null ? null : new() { Output = output };
return this.TerminateInstanceAsync(instanceId, options, cancellation);
}
Contributor
Author
I am okay with this change. Just should the new |
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
70e9c1a to
e2f9bc1
Compare
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
jviau
requested changes
Jan 29, 2024
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Contributor
Author
@jviau Pushed the suggested changes. Please review. |
jviau
requested changes
Jan 31, 2024
src/Client/OrchestrationServiceClientShim/ShimDurableTaskClient.cs
Outdated
Show resolved
Hide resolved
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>
jviau
requested changes
Feb 1, 2024
Member
jviau
left a comment
There was a problem hiding this comment.
Only a few small comments of recursive default behavior.
jviau
approved these changes
Feb 1, 2024
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
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.
This PR adds support to recursively terminate/purge sub-orchestrations in GrpcDurableTaskClient. It also sets the recursive behavior to be false by default.
Closes: #260