Bug 1370421 - Put base-toolchains builds into own perfherder bucket; r?mshal
Perfherder metrics are by default put in a bucket according to their
platform name. e.g. linux64/opt. Similar jobs emitting otherwise
identical metric names must differentiate the metrics by inserting
extra metadata.
Before this commit, we defined extra metadata in mozharness
sub-configs, as appropriate. As long as the sub-config remembers
to define the metadata, we're good.
However, some tasks don't use mozharness sub-configs. Instead, they
create variations in the taskgraph. The base toolchains builds
are an example. These share the same platform name (e.g. linux64/opt)
and the base mozharness config. Therefore there's no way to
distinguish these builds as being "base toolchains" from mozharness.
This commit teaches mozharness to look for an environment variable
defining extra perfherder keys to use to bucket results. We define
this variable in taskgraph for relevant tasks.
MozReview-Commit-ID: 8oGHGyx6Zn5
--- a/taskcluster/ci/build/linux.yml
+++ b/taskcluster/ci/build/linux.yml
@@ -102,16 +102,17 @@ linux64-base-toolchains/opt:
job-name: linux64-base-toolchains-opt
treeherder:
platform: linux64/opt
symbol: tc(Bb)
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker:
max-run-time: 36000
env:
+ PERFHERDER_EXTRA_OPTIONS: base-toolchains
TOOLTOOL_MANIFEST: browser/config/tooltool-manifests/linux64/base-toolchains.manifest
run:
using: mozharness
actions: [get-secrets build check-test update]
config:
- builds/releng_base_linux_64_builds.py
- balrog/production.py
script: "mozharness/scripts/fx_desktop_build.py"
@@ -126,16 +127,17 @@ linux64-base-toolchains/debug:
job-name: linux64-base-toolchains-debug
treeherder:
platform: linux64/debug
symbol: tc(Bb)
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker:
max-run-time: 36000
env:
+ PERFHERDER_EXTRA_OPTIONS: base-toolchains
TOOLTOOL_MANIFEST: browser/config/tooltool-manifests/linux64/base-toolchains.manifest
run:
using: mozharness
actions: [get-secrets build check-test update]
config:
- builds/releng_base_linux_64_builds.py
- balrog/production.py
script: "mozharness/scripts/fx_desktop_build.py"
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -2060,16 +2060,21 @@ or run without that action (ie: --no-{ac
perfherder_data['suites'].extend(self._load_sccache_stats())
# Ensure all extra options for this configuration are present.
for opt in self.config.get('perfherder_extra_options', []):
for suite in perfherder_data['suites']:
if opt not in suite.get('extraOptions', []):
suite.setdefault('extraOptions', []).append(opt)
+ for opt in os.environ.get('PERFHERDER_EXTRA_OPTIONS', '').split():
+ for suite in perfherder_data['suites']:
+ if opt not in suite.get('extraOptions', []):
+ suite.setdefault('extraOptions', []).append(opt)
+
if self.query_is_nightly():
for suite in perfherder_data['suites']:
suite.setdefault('extraOptions', []).insert(0, 'nightly')
if perfherder_data["suites"]:
self.info('PERFHERDER_DATA: %s' % json.dumps(perfherder_data))
def sendchange(self):