Closed cgillum closed 1 year ago
Hi @cgillum What should be the ETA for this feature in the java SDK?
Adding @kaibocai for visibility.
Here's a PR which shows how we added these APIs in the .NET Isolated SDK: https://github.com/microsoft/durabletask-dotnet/pull/97.
One additional thing we'll need in the case of Java is to also add a suspend/resume implementation to TaskOrchestrationExecutor.java
, specifically, the processEvent
method. The basic steps are outlined in this PR: https://github.com/Azure/durabletask/pull/764. You'll want to focus mostly on the changes to TaskOrchestrationExecutor.cs
(same class name as in Java) but also try to implement a similar integration test for validation.
Here's a PR which shows how we added these APIs in the .NET Isolated SDK: microsoft/durabletask-dotnet#97.
One additional thing we'll need in the case of Java is to also add a suspend/resume implementation to
TaskOrchestrationExecutor.java
, specifically, theprocessEvent
method. The basic steps are outlined in this PR: Azure/durabletask#764. You'll want to focus mostly on the changes toTaskOrchestrationExecutor.cs
(same class name as in Java) but also try to implement a similar integration test for validation.
Thanks @cgillum , I believe I will also add missing logics in https://github.com/microsoft/durabletask-sidecar right.
No, we don’t use the sidecar project anymore for Functions. There’s no need to change anything there.
Hi @cgillum , so currently all java sdk integration tests are based on durable side car just similar as .NET sdk (seems .NET sdk also skip the test because of missing logics in sidecar https://github.com/microsoft/durabletask-dotnet/pull/97), if we don't use sidecar for the integration tests, are you expecting we spawn up function runtime (just as what we are doing here https://github.com/microsoft/durabletask-java/tree/main/samples-azure-functions) for the testing? Thanks.
Oh, interesting. I didn’t realize that any changes to the sidecar were necessary. Maybe it needs to understood the new Suspended
enum value? If that’s the case, I recommend we try to update the sidecar to support this because that will make testing easier. My hope is that it’s very little work.
Actually, I just realized that I have local changes on my machine to support suspend/resume. I will create a PR for updating the sidecar.
Here's the PR for suspend/resume support in the sidecar. I don't have a way to test it yet, unfortunately, so I recommend you clone this PR locally and run it locally (F5 in visual studio, debugging the Microsoft.DurableTask.Sidecar.App
project should be good enough) for the testing of the Java work. If you run into issues, feel free to either let me know or investigate/make changes yourself.
Here is the feature documentation: https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-instance-management?tabs=csharp#suspend-and-resume-instances-preview
Here are the equivalent APIs for the .NET in-proc (WebJobs) model: