diff --git a/bot/code_coverage_bot/hooks/base.py b/bot/code_coverage_bot/hooks/base.py index b27b959c4..01d3f9a1e 100644 --- a/bot/code_coverage_bot/hooks/base.py +++ b/bot/code_coverage_bot/hooks/base.py @@ -54,6 +54,8 @@ def __init__( # Load coverage tasks for all platforms decision_task_id = taskcluster.get_decision_task(self.branch, self.revision) + assert decision_task_id is not None, "The decision task couldn't be found" + group = taskcluster.get_task_details(decision_task_id)["taskGroupId"] test_tasks = [ diff --git a/bot/code_coverage_bot/taskcluster.py b/bot/code_coverage_bot/taskcluster.py index a3a1bf565..521261373 100644 --- a/bot/code_coverage_bot/taskcluster.py +++ b/bot/code_coverage_bot/taskcluster.py @@ -17,7 +17,7 @@ def get_decision_task(branch, revision): - route = f"gecko.v2.{branch}.revision.{revision}.firefox.decision" + route = f"gecko.v2.{branch}.revision.{revision}.taskgraph.decision" index = taskcluster_config.get_service("index") try: return index.findTask(route)["taskId"] diff --git a/bot/tests/test_artifacts.py b/bot/tests/test_artifacts.py index 8660e5678..530fdd65c 100644 --- a/bot/tests/test_artifacts.py +++ b/bot/tests/test_artifacts.py @@ -271,7 +271,7 @@ def test_download_all( ): responses.add( responses.GET, - "http://taskcluster.test/api/index/v1/task/gecko.v2.mozilla-central.revision.7828a10a94b6afb78d18d9b7b83e7aa79337cc24.firefox.decision", + "http://taskcluster.test/api/index/v1/task/gecko.v2.mozilla-central.revision.7828a10a94b6afb78d18d9b7b83e7aa79337cc24.taskgraph.decision", json=LATEST_DECISION, status=200, ) diff --git a/bot/tests/test_taskcluster.py b/bot/tests/test_taskcluster.py index 0b5a88e5f..44aa4b448 100644 --- a/bot/tests/test_taskcluster.py +++ b/bot/tests/test_taskcluster.py @@ -36,7 +36,7 @@ def test_get_task_details(mock_taskcluster, LINUX_TASK_ID, LINUX_TASK): def test_get_task(mock_taskcluster, DECISION_TASK_ID, LATEST_DECISION): responses.add( responses.GET, - "http://taskcluster.test/api/index/v1/task/gecko.v2.mozilla-central.revision.7828a10a94b6afb78d18d9b7b83e7aa79337cc24.firefox.decision", + "http://taskcluster.test/api/index/v1/task/gecko.v2.mozilla-central.revision.7828a10a94b6afb78d18d9b7b83e7aa79337cc24.taskgraph.decision", json=LATEST_DECISION, status=200, ) @@ -51,7 +51,7 @@ def test_get_task(mock_taskcluster, DECISION_TASK_ID, LATEST_DECISION): def test_get_task_not_found(mock_taskcluster, TASK_NOT_FOUND): responses.add( responses.GET, - "http://taskcluster.test/api/index/v1/task/gecko.v2.mozilla-central.revision.b2a9a4bb5c94de179ae7a3f52fde58c0e2897498.firefox.decision", + "http://taskcluster.test/api/index/v1/task/gecko.v2.mozilla-central.revision.b2a9a4bb5c94de179ae7a3f52fde58c0e2897498.taskgraph.decision", json=TASK_NOT_FOUND, status=404, ) @@ -69,7 +69,7 @@ def test_get_task_failure(mock_taskcluster, TASK_NOT_FOUND): err["code"] = "RandomError" responses.add( responses.GET, - "http://taskcluster.test/api/index/v1/task/gecko.v2.mozilla-central.revision.b2a9a4bb5c94de179ae7a3f52fde58c0e2897498.firefox.decision", + "http://taskcluster.test/api/index/v1/task/gecko.v2.mozilla-central.revision.b2a9a4bb5c94de179ae7a3f52fde58c0e2897498.taskgraph.decision", json=err, status=500, )