Skip to content

Commit 7c360eb

Browse files
committed
Make get_last_task use the latest revision which was successfully parsed and uploaded by the bot
This way we don't have to wait a long time for tests to finish
1 parent cac088c commit 7c360eb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

report/firefox_code_coverage/codecoverage.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,6 @@ def is_taskcluster_loaner():
3838
return "TASKCLUSTER_INTERACTIVE" in os.environ
3939

4040

41-
def get_last_task():
42-
last_task = get_json(
43-
"https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.v2.mozilla-central.latest.firefox.linux64-ccov-opt"
44-
)
45-
return last_task["taskId"]
46-
47-
4841
def get_task(branch, revision):
4942
task = get_json(
5043
"https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.v2.%s.revision.%s.firefox.linux64-ccov-opt"
@@ -53,6 +46,13 @@ def get_task(branch, revision):
5346
return task["taskId"]
5447

5548

49+
def get_last_task():
50+
revision = get_json(
51+
"https://api.coverage.moz.tools/v2/latest?repository=mozilla-central"
52+
)[0]["revision"]
53+
return get_task("mozilla-central", revision)
54+
55+
5656
def get_task_details(task_id):
5757
task_details = get_json(
5858
"https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/" + task_id

0 commit comments

Comments
 (0)