Skip to content

Commit

Permalink
bot: Update index path of the decision task (#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-c authored May 18, 2020
1 parent a2b191e commit a152cf3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions bot/code_coverage_bot/hooks/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion bot/code_coverage_bot/taskcluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion bot/tests/test_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
6 changes: 3 additions & 3 deletions bot/tests/test_taskcluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand All @@ -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,
)
Expand All @@ -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,
)
Expand Down

0 comments on commit a152cf3

Please sign in to comment.