Open TheSpid opened 10 months ago
I faced the exact same issue with .NET 7 Azure functions, using Microsoft.Azure.Functions.Worker.Extensions.DurableTask v1.1.0 and Microsoft.Azure.Functions.Worker.Sdk v1.16.4 for my class-based orchestrator function. In my case, the issue was resolved when I reverted Microsoft.Azure.Functions.Worker.Sdk back to v1.15.1 (as found at https://github.com/Azure/azure-functions-durable-extension/issues/2668) and referenced Microsoft.DurableTask.Generators in order to initiate the orchestrator with the auto-generated ScheduleNew[orchestrator class name]InstanceAsync method. It may be related.
Both code and original post has been updated.
Working on a function based project I just accidentally referenced an orchestrator using the wrong name. Using version 1.1.0, i got the same error as above. The exception thrown by 1.1.0 seems to simply wrap and hide the errors encountered in the orchestrator instead of registering it on the orchestration in the storage account. This is mostly guesswork though. Based on this the issue seems to be twofold: 1: Error handling is off 2: Class based orchestrations can not be found.
Adding on to this, i can report that the functions created by the generators does not show up in the console during startup as functions found.
@TheSpid - did Jacob's suggestion resolve your issue?
I have tried Jacob's suggestion. It does not error but the activities are not triggered.
I have tried Jacob's suggestion. It does not error but the activities are not triggered.
I can confirm this, and that the issue still exists with
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.17.4" OutputItemType="Analyzer" />
I encountered this issue on a project and have created a minimal new function app for reproduction.
While using Microsoft.Azure.Functions.Worker.Extensions.DurableTask on any versions higher than 1.0.2 and utilizing class based functions as described here, calls to DurableTaskClient.ScheduleNewOrchestrationInstanceAsync fails with below message.
As mentioned, i created a small repro project which can be found here. I created an azure functions .net 8 project using azurite. I added a DurableOrchestrator azure function and then updated nuget packages and added class based versions of the orchestrator and activity. The result is the error above and an orchestration stuck in pending state. Switching to version 1.0.2 or 1.0.0 makes the class based code work just fine.
Edit: I want to clarify that the code works fine using function based with any version of the nuget package, and also works fine using 1.0.0 or 1.0.2 with class based. It only fails using >1.0.2 and class based.
Edit: I changed the code to use the class based extension methods (don't know why i didn't before). The result is mostly the same. Using 1.1.0 the call to the orchestrator fails with the above message. Using 1.0.0, the call works, but the orchestration status is set to failed with this message: