Closed kushals14 closed 1 year ago
Can not reproduce from durable sidecar, I think it's a issue from durable extension. @cgillum , @davidmrdavid can you provide some guide on how to debug from durable extension on the call waitForInstanceCompletion
Thank you.
The PR has been merged. Once validate will close this issue.
The root cause of the issue is the timeout
comparison from https://github.com/Azure/durabletask, the issue has already been fixed at https://github.com/Azure/durabletask/pull/910.
Validated on local the fix works perfectly.
@FunctionName("StartOrchestration")
public HttpResponseMessage startOrchestration(
@HttpTrigger(name = "req", methods = {HttpMethod.GET, HttpMethod.POST}, authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage<Optional<String>> request,
@DurableClientInput(name = "durableContext") DurableClientContext durableContext,
final ExecutionContext context) throws TimeoutException, InterruptedException {
context.getLogger().info("Java HTTP trigger processed a request.");
DurableTaskClient client = durableContext.getClient();
String instanceId = client.scheduleNewOrchestrationInstance("Cities", "testInput1", "123");
context.getLogger().info("Created new Java orchestration with instance ID = " + instanceId);
HttpResponseMessage checkStatusResponse = durableContext.createCheckStatusResponse(request, instanceId);
OrchestrationMetadata orchestrationMetadata = client.waitForInstanceCompletion(instanceId, null, true);
System.out.println(orchestrationMetadata);
return checkStatusResponse;
}
Will work with @davidmrdavid on the release plan for the fix.
@kushals14, the fix is released in Durable Extension 2.9.6, please customized your DF extension to 2.9.6 to try it out. You can do that follow the steps here https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-extension-upgrade#manually-upgrade-the-durable-functions-extension.
Closing the issue.
@kaibocai This app is deployed in azure and the extension is managed by extensionBundle we configured in host.json - Since I already have the manual polling in place to get the instance status, I would rather wait for this to be included in latest extension bundle.
Do you know what the timeline looks like for this to be included in latest extension bundle?
We are having some issues with the release of the extension bundle, but it should be available in the next few weeks. @lilyjma and @amamounelsayed should be able to provide more detail and a timeline for the extension bundle release.
I see Durable extension 2.9.6 is available with latest extension pack - I did a test call today and it seems to be working fine for both waitForInstanceCompletion and waitForInstanceStart.
Using v1.1.0 for durabletask-client and durabletask-azure-functions, Using host function v4.21.1 and extension bundle 4.5.0.
Instance creation and orchestration handling works fine. There is no issue using
durableContext.createCheckStatusResponse(request, instanceId)
after instance creation, the issue only exists while callingclient.waitForInstanceCompletion(instanceId, Duration.ofSeconds(timeoutInSeconds), true)
I am also using this in conjunction with Orchestration
waitForExternalEvent
andeventGridTrigger
toraiseEvent
on the created instance.Exception stack trace -
@kaibocai @cgillum