You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement QueryOrchestrationStatesSegmentedAsync functionality in DurableTask.Emulator (LocalOrchestrationService) #1332
Currently, calling QueryOrchestrationStatesSegmentedAsync on client services that use DurableTask.Emulator (LocalOrchestrationService) results in a NullReferenceException, since the emulator does not implement the instance store query APIs. This breaks scenarios where consumers want to test or query orchestration states in-proc (e.g., for integration testing or local feature development) and depend on behavior parity with instance-backed services like AzureTableInstanceStore.
This is only specific to client using DurableTask.ServiceBus backend in production and using DurableTask.Emulator for local runs.
Expected Behavior
The emulator should provide a (possibly in-memory) implementation of QueryOrchestrationStatesSegmentedAsync that allows query patterns similar to those in AzureTableInstanceStore.
Querying orchestration state in local scenarios would enable better automated tests and developer workflows without requiring a full Azure Storage/Table backend.
Actual Behavior
QueryOrchestrationStatesSegmentedAsync is not implemented and instanceStore is null, so attempting to call it results in a crash (NullReferenceException).
This is confusing when writing code agnostic to target backend.
To Reproduce
Use any client with LocalOrchestrationService and call QueryOrchestrationStatesSegmentedAsync.
Observe the crash.
Suggestions
Implement QueryOrchestrationStatesSegmentedAsync in the emulator so the query will enumerate in-memory orchestration state.
At a minimum, gracefully throw NotSupportedException with a clear message instead of returning null or failing with NullReferenceException.
References
[Issue context and analysis: https://github.com/Azure/durabletask]
Activity