Implement QueryOrchestrationStatesSegmentedAsync functionality in DurableTask.Emulator (LocalOrchestrationService)
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- csharp
- Domain
- backend, distributed-systems
Research direction
Start with LocalOrchestrationService.cs and trace QueryOrchestrationStatesSegmentedAsync alongside the corresponding AzureTableInstanceStore implementation. Reproduce the call with a LocalOrchestrationService client, then verify that orchestration state queries work against in-memory state or return a clear NotSupportedException instead of a NullReferenceException.
Written by the indexing model from the issue text.
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]
- Dominant language
- C#
- Stars
- 1.7k
- Forks
- 335
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 8
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure/durabletask
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Azure/durabletask#1398 · 2 comments ·
Maintainers usually reply within 3 days
-
Azure Storage backend: control queue partition left unowned for hours/days after lease expiresMay be free again @nytian claimed this 32 days ago, and no pull request is open. Open
Azure/durabletask#1389 · 1 comment · 1 assignee ·
Maintainers usually reply within 3 days
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
Azure/durabletask#1318 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Azure/durabletask#1301 · 3 comments ·
Maintainers usually reply within 3 days
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Azure/durabletask#1297 ·
Maintainers usually reply within 3 days
All issues in Azure/durabletask
Similar issues
-
copilot documentation
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 4 days
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
spectreconsole/spectre.console#2221 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
godotengine/godot-docs#12428 ·
Maintainers usually reply within 1 day