From 2deadc2bf696d119e412704f69559667120c68c3 Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Tue, 6 Jun 2017 16:23:14 -0700 Subject: [PATCH] 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 --HG-- extra : rebase_source : 5d7355c2e3118fcb893e699c248002d89c328483 --- taskcluster/ci/build/linux.yml | 2 ++ testing/mozharness/mozharness/mozilla/building/buildbase.py | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/taskcluster/ci/build/linux.yml b/taskcluster/ci/build/linux.yml index b1fb1764a78d..a5fd964d053a 100644 --- a/taskcluster/ci/build/linux.yml +++ b/taskcluster/ci/build/linux.yml @@ -107,6 +107,7 @@ linux64-base-toolchains/opt: worker: max-run-time: 36000 env: + PERFHERDER_EXTRA_OPTIONS: base-toolchains TOOLTOOL_MANIFEST: browser/config/tooltool-manifests/linux64/base-toolchains.manifest run: using: mozharness @@ -131,6 +132,7 @@ linux64-base-toolchains/debug: worker: max-run-time: 36000 env: + PERFHERDER_EXTRA_OPTIONS: base-toolchains TOOLTOOL_MANIFEST: browser/config/tooltool-manifests/linux64/base-toolchains.manifest run: using: mozharness diff --git a/testing/mozharness/mozharness/mozilla/building/buildbase.py b/testing/mozharness/mozharness/mozilla/building/buildbase.py index 42c03f19ba80..fc2b82a6396a 100755 --- a/testing/mozharness/mozharness/mozilla/building/buildbase.py +++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py @@ -2106,6 +2106,11 @@ or run without that action (ie: --no-{action})" 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')