Skip to content

Add task hub and instance ID prefix orchestration query filters #222

Description

@andystaples

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions