mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1296842: make target-task related parameters a fixed set; r=jmaher
The `from_parameters` method was never used, and let do confusion over the role of these parameters. Now there are only two, and they are always required. MozReview-Commit-ID: AbPqijXucu5 --HG-- extra : rebase_source : 85affd063a543c549afaaa36ce7ee31ed1f943d5
This commit is contained in:
parent
80f5b88beb
commit
51aa1fc9fb
@ -89,20 +89,9 @@ those in the target set, recursively. In a decision task, this set can be
|
||||
specified programmatically using one of a variety of methods (e.g., parsing try
|
||||
syntax or reading a project-specific configuration file).
|
||||
|
||||
The decision task writes its task set to the ``target_tasks.json`` artifact,
|
||||
and this can be copied into ``parameters.target_tasks`` and
|
||||
``parameters.target_tasks_method`` set to ``"from_parameters"`` for debugging
|
||||
with other ``mach taskgraph`` commands.
|
||||
|
||||
``target_tasks_method``
|
||||
(optional) The method to use to determine the target task set. This is the
|
||||
suffix of one of the functions in ``tascluster/taskgraph/target_tasks.py``.
|
||||
If omitted, all tasks are targeted.
|
||||
|
||||
``target_tasks``
|
||||
(optional) The target set method ``from_parameters`` reads the target set, as
|
||||
a list of task labels, from this parameter.
|
||||
The method to use to determine the target task set. This is the suffix of
|
||||
one of the functions in ``tascluster/taskgraph/target_tasks.py``.
|
||||
|
||||
``optimize_target_tasks``
|
||||
(optional; default True) If true, then target tasks are eligible for
|
||||
optimization.
|
||||
If true, then target tasks are eligible for optimization.
|
||||
|
@ -34,14 +34,6 @@ def get_method(method):
|
||||
return _target_task_methods[method]
|
||||
|
||||
|
||||
@_target_task('from_parameters')
|
||||
def target_tasks_from_parameters(full_task_graph, parameters):
|
||||
"""Get the target task set from parameters['target_tasks']. This is
|
||||
useful for re-running a decision task with the same target set as in an
|
||||
earlier run, by copying `target_tasks.json` into `parameters.yml`."""
|
||||
return parameters['target_tasks']
|
||||
|
||||
|
||||
@_target_task('try_option_syntax')
|
||||
def target_tasks_try_option_syntax(full_task_graph, parameters):
|
||||
"""Generate a list of target tasks based on try syntax in
|
||||
|
@ -26,11 +26,6 @@ class FakeTryOptionSyntax(object):
|
||||
|
||||
class TestTargetTasks(unittest.TestCase):
|
||||
|
||||
def test_from_parameters(self):
|
||||
method = target_tasks.get_method('from_parameters')
|
||||
self.assertEqual(method(None, {'target_tasks': ['a', 'b']}),
|
||||
['a', 'b'])
|
||||
|
||||
def default_matches(self, run_on_projects, project):
|
||||
method = target_tasks.get_method('default')
|
||||
graph = TaskGraph(tasks={
|
||||
|
Loading…
Reference in New Issue
Block a user