-
Notifications
You must be signed in to change notification settings - Fork 37
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 support in GrpcDurableTaskClient #262
Conversation
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
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.
As we now have multiple parameters for terminate, I recommend we do the following:
- Add
TerminateInstanceOptions
- Make the current
abstract
methodvirtual
. Default implementation will call one of the new methods we add. - Add
TerminateInstanceOptions
acceptingvirtual
methods - 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);
}
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>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
@jviau Pushed the suggested changes. Please review. |
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>
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.
Only a few small comments of recursive default behavior.
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
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