[Showstopper] Cannot use continuation token in API 7.0 and above (thus limiting number of results)
まだ誰も着手していません。
評価
調査の方向性
まず、生成された get_test_suites_for_plan メソッドを追跡し、その v6 と v7 のレスポンス処理を比較します。メソッドがリストを返す場合に、x-ms-continuationtoken ヘッダーがどのように表現されるかを確認します。対象となる endpoints で使用可能な continuation-token パスを確認できるか、または現在の API ではそれを公開できない理由を文書化できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hi, in earlier versions of the API (until 6.0.0b4), when making a request on some items (e.g. WorkItems, Test Suites, ...), you had a response object with a value and a continuation_token that you could use to make a new request and continue parsing.
For example, here is the prototype of such function:
def get_test_suites_for_plan(self, project, plan_id, expand=None, continuation_token=None, as_tree_view=None):
"""GetTestSuitesForPlan.
[Preview API] Get test suites for plan.
:param str project: Project ID or project name
:param int plan_id: ID of the test plan for which suites are requested.
:param str expand: Include the children suites and testers details.
:param str continuation_token: If the list of suites returned is not complete, a continuation token to query next batch of suites is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test suites.
:param bool as_tree_view: If the suites returned should be in a tree structure.
:rtype: :class:`<GetTestSuitesForPlanResponseValue>`
So you could do something like:
resp = client.get_test_suites_for_plan(project, my_plan_id)
suites = resp.value
while resp.continuation_token:
resp = client.get_test_suites_for_plan(project, my_plan_id)
suites += resp.value
With more recent versions (in particular 7.0), you now get a list returned (but with the limit of size imposed by the API).
For example, a version of similar function would be:
def get_test_suites_for_plan(self, project, plan_id, expand=None, continuation_token=None, as_tree_view=None):
"""GetTestSuitesForPlan.
[Preview API] Get test suites for plan.
:param str project: Project ID or project name
:param int plan_id: ID of the test plan for which suites are requested.
:param str expand: Include the children suites and testers details.
:param str continuation_token: If the list of suites returned is not complete, a continuation token to query next batch of suites is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test suites.
:param bool as_tree_view: If the suites returned should be in a tree structure.
:rtype: :class:`<[TestSuite]> <azure.devops.v6_0.test_plan.models.[TestSuite]>`
"""
How to retrieve the continuation token to continue parsing the other results?
- 主要言語
- Python
- スター
- 684
- フォーク
- 218
- 平均マージ
- 8日 10時間
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/azure-devops-python-api のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 55/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
microsoft/azure-devops-python-api の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
zostera/django-bootstrap4#894 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
use-agent-os/agent-os#3276 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NousResearch/hermes-agent#117848 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
zilliztech/memsearch#759 ·