Bug 1332255 - [followup] Fix buildername for linux64-pgo talos. r=dustin, a=test-only
authorWander Lairson Costa <wcosta@mozilla.com>
Mon, 23 Jan 2017 21:08:43 -0800
changeset 377923 3a2b54dddbe21c11e174c17ab3dd94096528980d
parent 377922 618ab47306e41b496995d087596536309726c68d
child 377924 149c9a185c28c53b5e57df9c70bc9a74258d8539
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin, test-only
bugs1332255
milestone53.0a2
Bug 1332255 - [followup] Fix buildername for linux64-pgo talos. r=dustin, a=test-only For correct platform name in TH, the buildername must contain the pgo string in the buildername. We work a bit more generic by matching any build variant.
taskcluster/taskgraph/transforms/tests.py
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -30,16 +30,17 @@ from voluptuous import (
     Optional,
     Required,
     Schema,
 )
 
 import copy
 import logging
 import os.path
+import re
 
 ARTIFACT_URL = 'https://queue.taskcluster.net/v1/task/{}/artifacts/{}'
 WORKER_TYPE = {
     # default worker types keyed by instance-size
     'large': 'aws-provisioner-v1/gecko-t-linux-large',
     'xlarge': 'aws-provisioner-v1/gecko-t-linux-xlarge',
     'legacy': 'aws-provisioner-v1/gecko-t-linux-medium',
     'default': 'aws-provisioner-v1/gecko-t-linux-large',
@@ -548,16 +549,29 @@ def set_retry_exit_status(config, tests)
     """Set the retry exit status to TBPL_RETRY, the value returned by mozharness
        scripts to indicate a transient failure that should be retried."""
     for test in tests:
         test['retry-exit-status'] = 4
         yield test
 
 
 @transforms.add
+def remove_linux_pgo_try_talos(config, tests):
+    """linux64-pgo talos tests don't run on try."""
+    def predicate(test):
+        return not(
+            test['test-platform'] == 'linux64-pgo/opt'
+            and test['suite'] == 'talos'
+            and config.params['project'] == 'try'
+        )
+    for test in filter(predicate, tests):
+        yield test
+
+
+@transforms.add
 def make_task_description(config, tests):
     """Convert *test* descriptions to *task* descriptions (input to
     taskgraph.transforms.task)"""
 
     for test in tests:
         label = '{}-{}-{}'.format(config.kind, test['test-platform'], test['test-name'])
         if test['chunks'] > 1:
             label += '-{}'.format(test['this-chunk'])
@@ -620,17 +634,16 @@ def make_task_description(config, tests)
 
         # the remainder (the worker-type and worker) differs depending on the
         # worker implementation
         worker_setup_functions[test['worker-implementation']](config, test, taskdesc)
 
         # yield only the task description, discarding the test description
         yield taskdesc
 
-
 worker_setup_functions = {}
 
 
 def worker_setup_function(name):
     def wrap(func):
         worker_setup_functions[name] = func
         return func
     return wrap
@@ -959,19 +972,25 @@ def buildbot_bridge_setup(config, test, 
         test_name = '{}-{}'.format(test_name, this_chunk)
 
     worker = taskdesc['worker'] = {}
     worker['implementation'] = test['worker-implementation']
 
     taskdesc['worker-type'] = 'buildbot-bridge/buildbot-bridge'
 
     if test.get('suite', '') == 'talos':
-        buildername = '{} {} talos {}'.format(
+        # 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) + ' '
+        buildername = '{} {} {}talos {}'.format(
             BUILDER_NAME_PREFIX[platform],
             branch,
+            variant,
             test_name
         )
         if buildername.startswith('Ubuntu'):
             buildername = buildername.replace('VM', 'HW')
     else:
         buildername = '{} {} {} test {}'.format(
             BUILDER_NAME_PREFIX[platform],
             branch,