Bug 1371497 - More robust handling of spaces in variant processing for Talos BBB; r=froydnj
authorGregory Szorc <gps@mozilla.com>
Fri, 09 Jun 2017 10:55:19 -0700
changeset 411385 2019434e6aac032a91aeeeb6b7fb4926ddc85aaf
parent 411384 3ab795d94b1f67ed90ecfd96ce6430b6b4d339f3
child 411386 71da3a25b5720039ef7a0c84e0b49a35c86cae0a
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1371497
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1371497 - More robust handling of spaces in variant processing for Talos BBB; r=froydnj We've changed this code twice recently and each time we accidentally disabled Talos builds because of subtle gotchas with regards to value checking and spaces in values. In this commit, we rewrite the code so spaces don't come into play during formatting. MozReview-Commit-ID: 7UX2X8LZDSF
taskcluster/taskgraph/transforms/job/mozharness_test.py
--- a/taskcluster/taskgraph/transforms/job/mozharness_test.py
+++ b/taskcluster/taskgraph/transforms/job/mozharness_test.py
@@ -434,38 +434,38 @@ def mozharness_test_buildbot_bridge(conf
 
     if mozharness.get('chunked', False):
         this_chunk = test.get('this-chunk')
         test_name = '{}-{}'.format(test_name, this_chunk)
 
     if test.get('suite', '') == 'talos':
         # on linux64-<variant>/<build>, we add the variant to the buildername
         m = re.match(r'\w+-([^/]+)/.*', test['test-platform'])
-        variant = ''
-        if m and m.group(1):
-            variant = m.group(1) + ' '
+        variant = m.group(1) if m and m.group(1) else ''
+
         # On beta and release, we run nightly builds on-push; the talos
         # builders need to run against non-nightly buildernames
-        if variant == 'nightly ':
+        if variant == 'nightly':
             variant = ''
+
         # this variant name has branch after the variant type in BBB bug 1338871
         if variant in ('stylo', 'stylo-sequential'):
-            buildername = '{} {}{} talos {}'.format(
-                BUILDER_NAME_PREFIX[platform],
-                variant,
-                branch,
-                test_name
-            )
+            name = '{prefix} {variant} {branch} talos {test_name}'
+        elif variant:
+            name = '{prefix} {branch} {variant} talos {test_name}'
         else:
-            buildername = '{} {} {}talos {}'.format(
-                BUILDER_NAME_PREFIX[platform],
-                branch,
-                variant,
-                test_name
-            )
+            name = '{prefix} {branch} talos {test_name}'
+
+        buildername = name.format(
+            prefix=BUILDER_NAME_PREFIX[platform],
+            variant=variant,
+            branch=branch,
+            test_name=test_name
+        )
+
         if buildername.startswith('Ubuntu'):
             buildername = buildername.replace('VM', 'HW')
     else:
         buildername = '{} {} {} test {}'.format(
             BUILDER_NAME_PREFIX[platform],
             branch,
             build_type,
             test_name