Skip to content

bot: Update index path of the decision task #526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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