tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 71b23d56f1a83dbb65d039d3b9d7984ce051e341
parent 0015485973e30be5e64cce098b5c57681d334aa3
Author: Andrew Halberstadt <ahal@mozilla.com>
Date:   Thu, 23 Oct 2025 14:42:43 +0000

Bug 1990567 - [ci] Fix pagination in `util.taskcluster.list_task_group_tasks`, r=releng-reviewers,taskgraph-reviewers,bhearsum,jcristau

Differential Revision: https://phabricator.services.mozilla.com/D269763

Diffstat:
Mtaskcluster/gecko_taskgraph/util/taskcluster.py | 17+++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/taskcluster/gecko_taskgraph/util/taskcluster.py b/taskcluster/gecko_taskgraph/util/taskcluster.py @@ -88,15 +88,16 @@ def trigger_hook(hook_group_id, hook_id, hook_payload): def list_task_group_tasks(task_group_id): """Generate the tasks in a task group""" - params = {} queue = get_taskcluster_client("queue") - while True: - resp = queue.listTaskGroup(task_group_id, params) - yield from resp["tasks"] - if resp.get("continuationToken"): - params = {"continuationToken": resp.get("continuationToken")} - else: - break + + tasks = [] + + def pagination_handler(response): + tasks.extend(response["tasks"]) + + queue.listTaskGroup(task_group_id, paginationHandler=pagination_handler) + + return tasks def list_task_group_incomplete_task_ids(task_group_id):