-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Labels
Description
There is a bug that sometimes occurs in which running any orchestrator in a DF node app will fail with an error saying "Exception: TypeError: HistoryEvent.init() missing 4 required positional arguments: 'EventType', 'EventId', 'IsPlayed', and 'Timestamp'" as below:
TypeError: HistoryEvent.__init__() missing 4 required positional arguments: 'EventType', 'EventId', 'IsPlayed', and 'Timestamp'
Stack: File "C:\Program Files\Microsoft\Azure Functions Core Tools\workers\python\3.10\WINDOWS\X64\azure_functions_worker\dispatcher.py", line 458, in _handle__invocation_request
call_result = await self._loop.run_in_executor(
File "C:\Python310\lib\concurrent\futures\thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "C:\Program Files\Microsoft\Azure Functions Core Tools\workers\python\3.10\WINDOWS\X64\azure_functions_worker\dispatcher.py", line 701, in _run_sync_func
return ExtensionManager.get_sync_invocation_wrapper(context,
File "C:\Program Files\Microsoft\Azure Functions Core Tools\workers\python\3.10\WINDOWS\X64\azure_functions_worker\extension.py", line 215, in _raw_invocation_wrapper
result = function(**args)
File "C:\Users\hossamnasr\ms\azure\test-functions\pystein-durable\.venv\lib\site-packages\azure\durable_functions\orchestrator.py", line 69, in handle
return Orchestrator(fn).handle(DurableOrchestrationContext.from_json(context_body))
File "C:\Users\hossamnasr\ms\azure\test-functions\pystein-durable\.venv\lib\site-packages\azure\durable_functions\models\DurableOrchestrationContext.py", line 98, in from_json
return cls(**json_dict)
File "C:\Users\hossamnasr\ms\azure\test-functions\pystein-durable\.venv\lib\site-packages\azure\durable_functions\models\DurableOrchestrationContext.py", line 50, in __init__
self._histories: List[HistoryEvent] = [HistoryEvent(**he) for he in history]
File "C:\Users\hossamnasr\ms\azure\test-functions\pystein-durable\.venv\lib\site-packages\azure\durable_functions\models\DurableOrchestrationContext.py", line 50, in <listcomp>
self._histories: List[HistoryEvent] = [HistoryEvent(**he) for he in history]
)
This occurs when:
- Using DF with the upcoming V2 programming model model (not yet public preview)
- Setting the
EnableWorkerIndexing
feature flag - Adding the
Microsoft.Azure.WebJobs.Extensions.WebPubSub
extension to your.csproj
file - Using the WebPubSub extension in your application
See this larger issue for more details: Azure/azure-functions-durable-extension#2338
MattiasAng and OscarCanek