Skip to content

Commit

Permalink
fix!: only add target_tasks_method filter if no other filters were sp…
Browse files Browse the repository at this point in the history
…ecified

BREAKING CHANGE: The target_tasks_method is now only implicitly added if
no other filters exist.

This is needed to fix a bug in Gecko's `./mach try` infrastructure,
however the change makes sense on its own. Currently there's no way to
forego target_tasks_method, and this allows us to do that.

Furthermore, there are no other built-in filters, so it's unlikely that
this will impact any existing consumers.
  • Loading branch information
ahal committed Oct 24, 2024
1 parent 431e051 commit 6f53752
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/taskgraph/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6f53752

Please sign in to comment.