Group WPT chunks together in Treeherder

This commit is contained in:
Simon Sapin 2020-01-07 15:30:06 +01:00
parent 709e06928a
commit 01b44f695b
2 changed files with 17 additions and 8 deletions

View file

@ -708,7 +708,12 @@ def wpt_chunks(platform, make_chunk_task, build_task, total_chunks, processes,
total_chunks, total_chunks,
width=len(str(total_chunks)), width=len(str(total_chunks)),
)) ))
.with_treeherder(platform, "%sWPT-%s" % (job_id_prefix, this_chunk)) .with_treeherder(
platform,
"WPT-%s" % this_chunk,
group_symbol=job_id_prefix + "WPT",
group_name=name_prefix + "web-platform-tests"
)
.with_curl_artifact_script(build_task, "target.tar.gz") .with_curl_artifact_script(build_task, "target.tar.gz")
.with_script("tar -xzf target.tar.gz") .with_script("tar -xzf target.tar.gz")
.with_index_and_artifacts_expire_in(log_artifacts_expire_in) .with_index_and_artifacts_expire_in(log_artifacts_expire_in)

View file

@ -172,7 +172,7 @@ class Task:
self.treeherder_required = True self.treeherder_required = True
return self return self
def with_treeherder(self, category, symbol): def with_treeherder(self, category, symbol, group_name=None, group_symbol=None):
assert len(symbol) <= 25, symbol assert len(symbol) <= 25, symbol
self.name = "%s: %s" % (category, self.name) self.name = "%s: %s" % (category, self.name)
@ -185,12 +185,16 @@ class Task:
platform = parts[0] platform = parts[0]
labels = parts[1:] or ["_"] labels = parts[1:] or ["_"]
# https://docs.taskcluster.net/docs/reference/integrations/taskcluster-treeherder/docs/task-treeherder-config # https://github.com/mozilla/treeherder/blob/master/schemas/task-treeherder-config.yml
self.with_extra(treeherder={ self.with_extra(treeherder=dict_update_if_truthy(
"machine": {"platform": platform}, {
"labels": labels, "machine": {"platform": platform},
"symbol": symbol, "labels": labels,
}) "symbol": symbol,
},
groupName=group_name,
groupSymbol=group_symbol,
))
if CONFIG.treeherder_repository_name: if CONFIG.treeherder_repository_name:
assert CONFIG.git_sha assert CONFIG.git_sha