Skip to content

Commit

Permalink
Bug 1921813 - Update verify_routes_notification_filters to align with…
Browse files Browse the repository at this point in the history
… Taskcluster > 37.5.0. r=taskgraph-reviewers,ahal

PR #3662 introduced `on-defined`, `on-pending` and `on-running`,
and deprecated `on-any` in favor of `on-transition` or `on-resolved`.

[jcristau: ported fix from taskcluster/taskgraph#500]

Differential Revision: https://phabricator.services.mozilla.com/D224138

UltraBlame original commit: df6cf4c8ca13a9d147575755cfd8b8ca79aca20a
  • Loading branch information
marco-c committed Oct 9, 2024
1 parent 11ea5cf commit 3a35146
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion taskcluster/gecko_taskgraph/util/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import os
import re
import sys
import warnings

import attr
from taskgraph.util.treeherder import join_symbol
Expand Down Expand Up @@ -211,7 +212,17 @@ def verify_routes_notification_filters(
if task is None:
return
route_prefix = "notify."
valid_filters = ("on-any", "on-completed", "on-failed", "on-exception")
valid_filters = (
"on-any",
"on-completed",
"on-defined",
"on-failed",
"on-exception",
"on-pending",
"on-resolved",
"on-running",
"on-transition",
)
task_dict = task.task
routes = task_dict.get("routes", [])

Expand All @@ -225,6 +236,13 @@ def verify_routes_notification_filters(
task.label, route_filter
)
)
if route_filter == "on-any":
warnings.warn(
DeprecationWarning(
f"notification filter '{route_filter}' is deprecated. Use "
"'on-transition' or 'on-resolved'."
)
)


@verifications.add("full_task_graph")
Expand Down

0 comments on commit 3a35146

Please sign in to comment.