microsoft / microsoft/durabletask-python

Add task hub and instance ID prefix orchestration query filters

未關閉
#222 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
Python
星號
40
分支
33
平均合併
2 天 2 小時
30 天內合併 PR
6

描述

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.

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 OrchestrationQuery 和 build_query_instances_req() 開始,然後追蹤它們的同步和非同步用戶端呼叫方。將現有的查詢欄位與 .NET OrchestrationQuery 參考進行比較,並為每個篩選器分別使用以及同時使用時新增測試;當兩個欄位都序列化到 InstanceQuery 中,且省略的欄位維持目前的 requests 不變時,即視為完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
api
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
冷清
描述清晰度
描述清楚
新手友好度
76/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。