Bug 1333255: only apply seta optimizations for tests; r=jonasfj draft
authorDustin J. Mitchell <dustin@mozilla.com>
Thu, 09 Mar 2017 14:45:12 -0500
changeset 498382 93a206dc9df029c23514f11d75e349d897dd44bf
parent 498381 9a2c0191595d7b759b45b8d49d2814ae983235b0
child 498383 83e12588431d82260eccc6356207dabd4c85bae6
push id49162
push userdmitchell@mozilla.com
push dateTue, 14 Mar 2017 16:53:56 +0000
reviewersjonasfj
bugs1333255
milestone55.0a1
Bug 1333255: only apply seta optimizations for tests; r=jonasfj MozReview-Commit-ID: FoIlgwBe4Gd
taskcluster/taskgraph/optimize.py
taskcluster/taskgraph/transforms/task.py
taskcluster/taskgraph/transforms/tests.py
--- a/taskcluster/taskgraph/optimize.py
+++ b/taskcluster/taskgraph/optimize.py
@@ -201,20 +201,16 @@ def opt_index_search(task, params, index
 
     return False, None
 
 
 @optimization('seta')
 def opt_seta(task, params):
     bbb_task = False
 
-    # no need to call SETA for build jobs
-    if task.task.get('extra', {}).get('treeherder', {}).get('jobKind', '') == 'build':
-        return False, None
-
     # for bbb tasks we need to send in the buildbot buildername
     if task.task.get('provisionerId', '') == 'buildbot-bridge':
         label = task.task.get('payload').get('buildername')
         bbb_task = True
     else:
         label = task.label
 
     # we would like to return 'False, None' while it's high_value_task
--- a/taskcluster/taskgraph/transforms/task.py
+++ b/taskcluster/taskgraph/transforms/task.py
@@ -790,17 +790,16 @@ def add_files_changed(config, tasks):
 
         yield task
 
 
 @transforms.add
 def setup_optimizations(config, tasks):
     for task in tasks:
         optimizations = task.setdefault('optimizations', [])
-        optimizations.append(['seta'])
         if 'when' in task and 'files-changed' in task['when']:
             optimizations.append(['files-changed', task['when']['files-changed']])
         yield task
 
 
 @transforms.add
 def build_task(config, tasks):
     for task in tasks:
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -654,16 +654,17 @@ def make_job_description(config, tests):
         jobdesc['when'] = test.get('when', {})
         jobdesc['attributes'] = attributes
         jobdesc['dependencies'] = {'build': build_label}
         jobdesc['expires-after'] = test['expires-after']
         jobdesc['routes'] = []
         jobdesc['run-on-projects'] = test.get('run-on-projects', ['all'])
         jobdesc['scopes'] = []
         jobdesc['tags'] = test.get('tags', {})
+        jobdesc['optimizations'] = [['seta']]  # always run SETA for tests
         jobdesc['extra'] = {
             'chunks': {
                 'current': test['this-chunk'],
                 'total': test['chunks'],
             },
             'suite': {
                 'name': suite,
                 'flavor': flavor,