Skip to content

Commit 0399fad

Browse files
committed
report: Support cases where a push doesn't contain a Linux coverage build
1 parent e24fe78 commit 0399fad

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

report/firefox_code_coverage/codecoverage.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ def is_taskcluster_loaner():
3939

4040
def get_task(branch, revision):
4141
task = get_json(
42-
"https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.v2.%s.revision.%s.firefox.linux64-ccov-opt"
43-
% (branch, revision)
42+
f"https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.v2.{branch}.revision.{revision}.firefox.decision"
4443
)
4544
return task["taskId"]
4645

@@ -150,15 +149,19 @@ def get_task_status(task_id):
150149

151150

152151
def download_coverage_artifacts(
153-
build_task_id, suites, platforms, artifacts_path, suites_to_ignore=["talos", "awsy"]
152+
decision_task_id,
153+
suites,
154+
platforms,
155+
artifacts_path,
156+
suites_to_ignore=["talos", "awsy"],
154157
):
155158
try:
156159
os.mkdir(artifacts_path)
157160
except OSError as e:
158161
if e.errno != errno.EEXIST:
159162
raise e
160163

161-
task_data = get_task_details(build_task_id)
164+
task_data = get_task_details(decision_task_id)
162165

163166
# Returns True if the task is a test-related coverage task (build tasks are included).
164167
def _is_test_task(t):

0 commit comments

Comments
 (0)