Closed
Bug 1992376
Opened 7 months ago
Closed 6 months ago
retrigger gets into an infinite loop if a push has more than 1000 action tasks
Categories
(Firefox Build System :: Task Configuration, defect, P3)
Firefox Build System
Task Configuration
Tracking
(firefox-esr115 wontfix, firefox-esr140 wontfix, firefox144 wontfix, firefox145 wontfix, firefox146 fixed)
People
(Reporter: jcristau, Unassigned)
References
Details
The request to taskcluster in https://searchfox.org/firefox-main/rev/2c8e9bccfd6ce951ceda8d46ab619f461b7fd0bc/third_party/python/taskcluster_taskgraph/taskgraph/util/taskcluster.py#264 is buggy:
- it uses the POST version of listTasks instead of GET
- it passes continuationToken in the POST body instead of the GET query string
- the index service ignores that value, so we keep getting the same 1000 tasks back over and over
A minimal fix looks like the below, although there's bigger changes to this code in taskgraph 16.
diff --git a/third_party/python/taskcluster_taskgraph/taskgraph/util/taskcluster.py b/third_party/python/taskcluster_taskgraph/taskgraph/util/taskcluster.py
--- a/third_party/python/taskcluster_taskgraph/taskgraph/util/taskcluster.py
+++ b/third_party/python/taskcluster_taskgraph/taskgraph/util/taskcluster.py
@@ -253,25 +253,25 @@ def get_artifact_from_index(index_path,
def list_tasks(index_path, use_proxy=False):
"""
Returns a list of task_ids where each task_id is indexed under a path
in the index. Results are sorted by expiration date from oldest to newest.
"""
results = []
- data = {}
+ params = {}
while True:
response = _do_request(
- get_index_url(index_path, use_proxy, multiple=True), json=data
+ get_index_url(index_path, use_proxy, multiple=True), params=params, method="get"
)
response = response.json()
results += response["tasks"]
if response.get("continuationToken"):
- data = {"continuationToken": response.get("continuationToken")}
+ params = {"continuationToken": response.get("continuationToken")}
else:
break
# We can sort on expires because in the general case
# all of these tasks should be created with the same expires time so they end up in
# order from earliest to latest action. If more correctness is needed, consider
# fetching each task and sorting on the created date.
results.sort(key=lambda t: parse_time(t["expires"]))
Comment 1•7 months ago
|
||
The severity field is not set for this bug.
:bhearsum, could you have a look please?
For more information, please visit BugBot documentation.
Flags: needinfo?(bhearsum)
Updated•7 months ago
|
Severity: -- → S3
Flags: needinfo?(bhearsum)
Priority: -- → P3
| Reporter | ||
Comment 2•6 months ago
|
||
This was fixed as part of bug 1990567.
Status: NEW → RESOLVED
Closed: 6 months ago
status-firefox144:
--- → wontfix
status-firefox145:
--- → wontfix
status-firefox146:
--- → fixed
status-firefox-esr115:
--- → wontfix
status-firefox-esr140:
--- → wontfix
Depends on: 1990567
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•