Bug 1568277 - [taskgraph] Remove some dead code in optimize.py r=tomprince
☠☠ backed out by 8da8443e0bcb ☠ ☠
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Thu, 15 Aug 2019 18:48:07 +0000
changeset 488331 9b89f970d46b0c966e7f523171cee853cb47407c
parent 488330 c99af9d2e6381e171166f7b31629cc3539252cfa
child 488332 c8f797a197313295516bfa1b05962ea54708e997
push id36440
push userncsoregi@mozilla.com
push dateFri, 16 Aug 2019 03:57:48 +0000
treeherdermozilla-central@a58b7dc85887 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstomprince
bugs1568277
milestone70.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 1568277 - [taskgraph] Remove some dead code in optimize.py r=tomprince Differential Revision: https://phabricator.services.mozilla.com/D40201
taskcluster/taskgraph/optimize.py
--- a/taskcluster/taskgraph/optimize.py
+++ b/taskcluster/taskgraph/optimize.py
@@ -16,27 +16,24 @@ from __future__ import absolute_import, 
 import logging
 import os
 from collections import defaultdict
 
 from .graph import Graph
 from . import files_changed
 from .taskgraph import TaskGraph
 from .util.seta import is_low_value_task
-from .util.perfile import perfile_number_of_chunks
 from .util.taskcluster import find_task_id
 from .util.parameterization import resolve_task_references
 from mozbuild.util import memoize
 from slugid import nice as slugid
 from mozbuild.base import MozbuildObject
 
 logger = logging.getLogger(__name__)
 
-TOPSRCDIR = os.path.abspath(os.path.join(__file__, '../../../'))
-
 
 def optimize_task_graph(target_task_graph, params, do_not_optimize,
                         existing_tasks=None, strategies=None):
     """
     Perform task optimization, returning a taskgraph and a map from label to
     assigned taskId, including replacement tasks.
     """
     label_to_taskid = {}
@@ -371,23 +368,8 @@ class SkipUnlessSchedules(OptimizationSt
 
         scheduled = self.scheduled_by_push(params['head_repository'], params['head_rev'])
         conditions = set(conditions)
         # if *any* of the condition components are scheduled, do not optimize
         if conditions & scheduled:
             return False
 
         return True
-
-
-class TestVerify(OptimizationStrategy):
-    def should_remove_task(self, task, params, _):
-        # we would like to return 'False, None' while it's high_value_task
-        # and we wouldn't optimize it. Otherwise, it will return 'True, None'
-        env = params.get('try_task_config', {}) or {}
-        env = env.get('templates', {}).get('env', {})
-        if perfile_number_of_chunks(params.is_try(),
-                                    env.get('MOZHARNESS_TEST_PATHS', ''),
-                                    params.get('head_repository', ''),
-                                    params.get('head_rev', ''),
-                                    task):
-            return False
-        return True