Skip to content

Commit

Permalink
Make get_last_task use the latest revision which was successfully par…
Browse files Browse the repository at this point in the history
…sed and uploaded by the bot

This way we don't have to wait a long time for tests to finish
  • Loading branch information
marco-c committed Jan 3, 2020
1 parent cac088c commit 7c360eb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions report/firefox_code_coverage/codecoverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@ def is_taskcluster_loaner():
return "TASKCLUSTER_INTERACTIVE" in os.environ


def get_last_task():
last_task = get_json(
"https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.v2.mozilla-central.latest.firefox.linux64-ccov-opt"
)
return last_task["taskId"]


def get_task(branch, revision):
task = get_json(
"https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.v2.%s.revision.%s.firefox.linux64-ccov-opt"
Expand All @@ -53,6 +46,13 @@ def get_task(branch, revision):
return task["taskId"]


def get_last_task():
revision = get_json(
"https://api.coverage.moz.tools/v2/latest?repository=mozilla-central"
)[0]["revision"]
return get_task("mozilla-central", revision)


def get_task_details(task_id):
task_details = get_json(
"https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/" + task_id
Expand Down

0 comments on commit 7c360eb

Please sign in to comment.