Summary
The protobuf InstanceQuery supports taskHubNames and instanceIdPrefix, and the .NET Durable Task client exposes both filters. Python's OrchestrationQuery and request builder currently omit them.
Current behavior
Python orchestration queries support creation-time bounds, runtime status, result limits, and payload inclusion. There is no way to:
- restrict results to one or more task hubs;
- restrict results to instance IDs beginning with a prefix.
The generated protobuf already contains both fields, so no protocol update is required.
Expected parity
Extend OrchestrationQuery with Python-style equivalents of:
task_hub_names: list[str] | None
instance_id_prefix: str | None
Serialize these through build_query_instances_req() to InstanceQuery.taskHubNames and InstanceQuery.instanceIdPrefix for both sync and async clients.
.NET references:
Acceptance criteria
- Callers can filter orchestration queries by task hub names.
- Callers can filter orchestration queries by instance ID prefix.
- Both fields are serialized into the existing protobuf request.
- Existing queries remain backward compatible when the fields are omitted.
- Unit tests cover each filter independently and together.
Summary
The protobuf
InstanceQuerysupportstaskHubNamesandinstanceIdPrefix, and the .NET Durable Task client exposes both filters. Python'sOrchestrationQueryand request builder currently omit them.Current behavior
Python orchestration queries support creation-time bounds, runtime status, result limits, and payload inclusion. There is no way to:
The generated protobuf already contains both fields, so no protocol update is required.
Expected parity
Extend
OrchestrationQuerywith Python-style equivalents of:task_hub_names: list[str] | Noneinstance_id_prefix: str | NoneSerialize these through
build_query_instances_req()toInstanceQuery.taskHubNamesandInstanceQuery.instanceIdPrefixfor both sync and async clients..NET references:
OrchestrationQueryGrpcDurableTaskClient.GetAllInstancesAsyncAcceptance criteria