Skip to content

Commit df8fbc4

Browse files
committed
bot: Update index path of the decision task
1 parent f1b8dab commit df8fbc4

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

bot/code_coverage_bot/hooks/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ def __init__(
5454
# Load coverage tasks for all platforms
5555
decision_task_id = taskcluster.get_decision_task(self.branch, self.revision)
5656

57+
assert decision_task_id is not None, "The decision task couldn't be found"
58+
5759
group = taskcluster.get_task_details(decision_task_id)["taskGroupId"]
5860

5961
test_tasks = [

bot/code_coverage_bot/taskcluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
def get_decision_task(branch, revision):
20-
route = f"gecko.v2.{branch}.revision.{revision}.firefox.decision"
20+
route = f"gecko.v2.{branch}.revision.{revision}.taskgraph.decision"
2121
index = taskcluster_config.get_service("index")
2222
try:
2323
return index.findTask(route)["taskId"]

bot/tests/test_artifacts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def test_download_all(
271271
):
272272
responses.add(
273273
responses.GET,
274-
"http://taskcluster.test/api/index/v1/task/gecko.v2.mozilla-central.revision.7828a10a94b6afb78d18d9b7b83e7aa79337cc24.firefox.decision",
274+
"http://taskcluster.test/api/index/v1/task/gecko.v2.mozilla-central.revision.7828a10a94b6afb78d18d9b7b83e7aa79337cc24.taskgraph.decision",
275275
json=LATEST_DECISION,
276276
status=200,
277277
)

bot/tests/test_taskcluster.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_get_task_details(mock_taskcluster, LINUX_TASK_ID, LINUX_TASK):
3636
def test_get_task(mock_taskcluster, DECISION_TASK_ID, LATEST_DECISION):
3737
responses.add(
3838
responses.GET,
39-
"http://taskcluster.test/api/index/v1/task/gecko.v2.mozilla-central.revision.7828a10a94b6afb78d18d9b7b83e7aa79337cc24.firefox.decision",
39+
"http://taskcluster.test/api/index/v1/task/gecko.v2.mozilla-central.revision.7828a10a94b6afb78d18d9b7b83e7aa79337cc24.taskgraph.decision",
4040
json=LATEST_DECISION,
4141
status=200,
4242
)
@@ -51,7 +51,7 @@ def test_get_task(mock_taskcluster, DECISION_TASK_ID, LATEST_DECISION):
5151
def test_get_task_not_found(mock_taskcluster, TASK_NOT_FOUND):
5252
responses.add(
5353
responses.GET,
54-
"http://taskcluster.test/api/index/v1/task/gecko.v2.mozilla-central.revision.b2a9a4bb5c94de179ae7a3f52fde58c0e2897498.firefox.decision",
54+
"http://taskcluster.test/api/index/v1/task/gecko.v2.mozilla-central.revision.b2a9a4bb5c94de179ae7a3f52fde58c0e2897498.taskgraph.decision",
5555
json=TASK_NOT_FOUND,
5656
status=404,
5757
)
@@ -69,7 +69,7 @@ def test_get_task_failure(mock_taskcluster, TASK_NOT_FOUND):
6969
err["code"] = "RandomError"
7070
responses.add(
7171
responses.GET,
72-
"http://taskcluster.test/api/index/v1/task/gecko.v2.mozilla-central.revision.b2a9a4bb5c94de179ae7a3f52fde58c0e2897498.firefox.decision",
72+
"http://taskcluster.test/api/index/v1/task/gecko.v2.mozilla-central.revision.b2a9a4bb5c94de179ae7a3f52fde58c0e2897498.taskgraph.decision",
7373
json=err,
7474
status=500,
7575
)

0 commit comments

Comments
 (0)