-
Notifications
You must be signed in to change notification settings - Fork 7
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
Orchestrator functions failing if not returning anything #126
Orchestrator functions failing if not returning anything #126
Comments
Hi @akshaykumars10. I noticed that your host.json file references a "Preview" build of extension bundles v4. "extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle.Preview",
"version": "[4.*, 5.0.0)"
}, Do you encounter this same problem if you switch to using the non-preview (GA) version of the v4 extension bundles? "extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[4.*, 5.0.0)"
}, |
Hi @cgillum |
Thanks @akshaykumars10 for confirming. A couple more questions to try and narrow down the problem further:
|
Hi @cgillum
This fails with a different error. Error observed: |
Seeing this also even with some basic sample code adapted from the docs. I still get a (Edited to remove java sleep in favor of package com.function;
import com.microsoft.azure.functions.annotation.*;
import com.microsoft.azure.functions.*;
import java.time.Duration;
import com.microsoft.durabletask.*;
import com.microsoft.durabletask.azurefunctions.DurableClientContext;
import com.microsoft.durabletask.azurefunctions.DurableClientInput;
import com.microsoft.durabletask.azurefunctions.DurableOrchestrationTrigger;
public class EternalOrchTest {
@FunctionName("Trigger_Eternal_Orchestration")
public HttpResponseMessage triggerEternalOrchestration(
@HttpTrigger(name = "req", methods = {HttpMethod.GET, HttpMethod.POST}, authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage<?> req,
@DurableClientInput(name = "durableContext") DurableClientContext durableContext) {
String instanceID = "StaticID";
DurableTaskClient client = durableContext.getClient();
client.scheduleNewOrchestrationInstance("Periodic_Cleanup_Loop", null, instanceID);
return durableContext.createCheckStatusResponse(req, instanceID);
}
@FunctionName("Periodic_Cleanup_Loop")
public void periodicCleanupLoop(
@DurableOrchestrationTrigger(name = "ctx") TaskOrchestrationContext ctx) {
ctx.createTimer(Duration.ofHours(1)).await();
ctx.continueAsNew(null);
}
} GET http://localhost:7071/api/Trigger_Eternal_Orchestration HTTP/1.1
User-Agent: vscode-restclient
accept-encoding: gzip, deflate
HTTP/1.1 202 Accepted
Connection: close
Content-Type: application/json; charset=utf-8
Date: Wed, 05 Apr 2023 21:34:52 GMT
Server: Kestrel
Location: http://localhost:7071/runtime/webhooks/durabletask/instances/StaticID?code={systemKey}
Transfer-Encoding: chunked
{
"id": "StaticID",
"purgeHistoryDeleteUri": "http://localhost:7071/runtime/webhooks/durabletask/instances/StaticID?code={systemKey}",
"sendEventPostUri": "http://localhost:7071/runtime/webhooks/durabletask/instances/StaticID/raiseEvent/{eventName}?code={systemKey}",
"statusQueryGetUri": "http://localhost:7071/runtime/webhooks/durabletask/instances/StaticID?code={systemKey}",
"terminatePostUri": "http://localhost:7071/runtime/webhooks/durabletask/instances/StaticID/terminate?reason={text}&code={systemKey}"
}
|
@kaibocai can you help find an owner for this item to help investigate? The problem seems to be that the orchestration middleware in the Java SDK is not returning a value back to the Durable Functions extension. That's basically what this error message means:
|
It's an edge case I forgot to consider about when support durable function on azure function java. I have created a PR for the fix Azure/azure-functions-java-worker#711, will release the java worker asap. Thanks. |
Hi @kaibocai |
Hi @akshaykumars10 , the java worker is part of the azure function plantform that you functions are running on, it's not a dependency that should be included in your function pom file. Currently we are in the process of azure functions V4.21.1 release, which contains the java worker that has the fix for this issue. You can view the version of your functions from portal, for example Once the runtime version is upgrade to 4.21.1, you shouldn't have this issue anymore. We are in the release process of V4.21.1, it should be completed in next week (which means sometime next week your runtime version will automatically bump up to 4.21.1). I will keep you updated once it's released to all regions. At the meantime, you can also track it from the above picture. Thanks. |
We have an eternal orchestrator function in our durable function app. This orchestrator function doesn’t need to return anything. However, with the
void
return type, the orchestrator function is failing.Error:
System.InvalidOperationException: The function invocation resulted in a null response. This means that either the orchestrator function was implemented incorrectly, the Durable Task language SDK was implemented incorrectly, or that the destination language worker is not sending the function result back to the host.
Function Code:
Function App Name:
possmartpolling-java
Instance Id:
testeternal123
Please let me know if any other details are required.
The text was updated successfully, but these errors were encountered: