Bug 1286075: allow optimization of tasks whose dependencies have not been optimized; r=armenzg
MikeLing initially did this in bug 1287018. The intent of this conditional was to make optimization faster by not even checking most tasks, based on the assumption that if the prerequisite to a task has changed (for example, a docker image or a build), then naturally we will want to execute that task. However, as we have developed actual optimization methods, this has proven not to be the case: we might want to optimize a test out if its inputs have not changed, even if a new installer has been built. Similarly, SETA may optimize tasks out even if their inputs have changed. MozReview-Commit-ID: LgHET3Z84GB
This commit is contained in:
@@ -142,8 +142,8 @@ class TestOptimize(unittest.TestCase):
|
||||
)
|
||||
self.assertEqual
|
||||
|
||||
def test_annotate_task_graph_nos_propagate(self):
|
||||
"annotating marks a task with a non-optimized dependency as non-optimized"
|
||||
def test_annotate_task_graph_nos_do_not_propagate(self):
|
||||
"a task with a non-optimized dependency can be optimized"
|
||||
OptimizingTask.optimize = \
|
||||
lambda self: (False, None) if self.label == 'task1' else (True, 'taskid')
|
||||
graph = self.make_graph(
|
||||
@@ -158,7 +158,7 @@ class TestOptimize(unittest.TestCase):
|
||||
self.assert_annotations(
|
||||
graph,
|
||||
task1=(False, None),
|
||||
task2=(False, None), # kind would have returned (True, 'taskid') here
|
||||
task2=(True, 'taskid'),
|
||||
task3=(True, 'taskid')
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user