diff --git a/docs/reference/migrations.rst b/docs/reference/migrations.rst index c416bab3..4601e24a 100644 --- a/docs/reference/migrations.rst +++ b/docs/reference/migrations.rst @@ -3,6 +3,26 @@ Migration Guide This page can help when migrating Taskgraph across major versions. +11.x -> 12.x +------------ + +* Add ``target_tasks_method`` to the front of the ``filters`` parameter wherever + you are also using a custom filter. + + For example, if you are passing in: + + .. code-block:: yaml + + filters: ["my_custom_filter"] + + Change it to: + + .. code-block:: yaml + + filters: ["target_tasks_method", "my_custom_filter"] + + No action is necessary if the ``filters`` parameter was empty. + 10.x -> 11.x ------------ diff --git a/src/taskgraph/generator.py b/src/taskgraph/generator.py index 0e606329..3fea99f0 100644 --- a/src/taskgraph/generator.py +++ b/src/taskgraph/generator.py @@ -269,9 +269,9 @@ def _run(self): logger.debug(f"Dumping parameters:\n{repr(parameters)}") filters = parameters.get("filters", []) - # Always add legacy target tasks method until we deprecate that API. - if "target_tasks_method" not in filters: - filters.insert(0, "target_tasks_method") + if not filters: + # Default to target_tasks_method if none specified. + filters.append("target_tasks_method") filters = [filter_tasks.filter_task_functions[f] for f in filters] yield self.verify("parameters", parameters)