зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1568277 - [taskgraph] Ensure user specified optimization strategies update instead of replace the default ones r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D40205 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
7828bae0b4
Коммит
4a606dff00
|
@ -334,7 +334,7 @@ class TaskGraphGenerator(object):
|
|||
parameters,
|
||||
do_not_optimize,
|
||||
existing_tasks=existing_tasks,
|
||||
strategies=strategies,
|
||||
strategy_override=strategies,
|
||||
)
|
||||
|
||||
yield verifications('optimized_task_graph', optimized_task_graph, graph_config)
|
||||
|
|
|
@ -36,7 +36,7 @@ def register_strategy(name, args=()):
|
|||
|
||||
|
||||
def optimize_task_graph(target_task_graph, params, do_not_optimize,
|
||||
existing_tasks=None, strategies=None):
|
||||
existing_tasks=None, strategy_override=None):
|
||||
"""
|
||||
Perform task optimization, returning a taskgraph and a map from label to
|
||||
assigned taskId, including replacement tasks.
|
||||
|
@ -46,7 +46,9 @@ def optimize_task_graph(target_task_graph, params, do_not_optimize,
|
|||
existing_tasks = {}
|
||||
|
||||
# instantiate the strategies for this optimization process
|
||||
strategies = strategies or registry.copy()
|
||||
strategies = registry.copy()
|
||||
if strategy_override:
|
||||
strategies.update(strategy_override)
|
||||
|
||||
optimizations = _get_optimizations(target_task_graph, strategies)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче