-
Notifications
You must be signed in to change notification settings - Fork 325
Implement QueryOrchestrationStatesSegmentedAsync functionality in DurableTask.Emulator (LocalOrchestrationService) #1332
Copy link
Copy link
Open
Description
Problem
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
QueryOrchestrationStatesSegmentedAsyncthat allows query patterns similar to those inAzureTableInstanceStore. - Querying orchestration state in local scenarios would enable better automated tests and developer workflows without requiring a full Azure Storage/Table backend.
Actual Behavior
QueryOrchestrationStatesSegmentedAsyncis 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
LocalOrchestrationServiceand callQueryOrchestrationStatesSegmentedAsync. - Observe the crash.
Suggestions
- Implement
QueryOrchestrationStatesSegmentedAsyncin 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]
- [Emulator implementation: LocalOrchestrationService.cs]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels