This is an automated email from the ASF dual-hosted git repository.
shahar1 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 45161ae7da0 Remove resolved triggers from KNOWN_VIOLATIONS allowlist
(#67069)
45161ae7da0 is described below
commit 45161ae7da05452651743ddb3b14a5d1cbf62626
Author: Shahar Epstein <[email protected]>
AuthorDate: Mon May 18 07:28:14 2026 +0300
Remove resolved triggers from KNOWN_VIOLATIONS allowlist (#67069)
---
scripts/ci/prek/check_trigger_serialize_init.py | 20 ++------------------
1 file changed, 2 insertions(+), 18 deletions(-)
diff --git a/scripts/ci/prek/check_trigger_serialize_init.py
b/scripts/ci/prek/check_trigger_serialize_init.py
index 6e91056e072..f1050a9340e 100755
--- a/scripts/ci/prek/check_trigger_serialize_init.py
+++ b/scripts/ci/prek/check_trigger_serialize_init.py
@@ -54,21 +54,7 @@ DEFERRING_DOC = (
"https://github.com/apache/airflow/blob/main/airflow-core/docs/authoring-and-scheduling/deferring.rst"
)
-# Key format for both sets below: "<path relative to the providers/
directory>::<ClassName>".
-
-# Trigger classes that genuinely violate the __init__/serialize() contract
today. They predate
-# the check and are excluded so it can be enabled without a tree-wide fix;
each is tracked for a
-# follow-up fix in a separate PR. Do NOT add new entries here -- fix the
trigger instead.
-KNOWN_VIOLATIONS: set[str] = {
- # `caller` is passed straight to DatabricksHook(caller=...) and never
stored/serialized, so it
- # falls back to the class-name default on a triggerer round-trip.
-
"databricks/src/airflow/providers/databricks/triggers/databricks.py::DatabricksExecutionTrigger",
-
"databricks/src/airflow/providers/databricks/triggers/databricks.py::DatabricksSQLStatementExecutionTrigger",
- # `poll_interval` and `impersonation_chain` are stored and used but
missing from serialize().
-
"google/src/airflow/providers/google/cloud/triggers/datafusion.py::DataFusionStartPipelineTrigger",
- # `endpoint_prefix` is stored as self._endpoint_prefix and used in run()
but missing from serialize().
-
"apache/livy/src/airflow/providers/apache/livy/triggers/livy.py::LivyTrigger",
-}
+# Key format: "<path relative to the providers/ directory>::<ClassName>".
# Trigger classes that the check flags but which are correct *by design*: an
old/aliased parameter
# is folded into its replacement at construction time, so it does not need to
round-trip. These are
@@ -83,8 +69,6 @@ BY_DESIGN_EXCLUSIONS: set[str] = {
"cncf/kubernetes/src/airflow/providers/cncf/kubernetes/triggers/job.py::KubernetesJobTrigger",
}
-_EXCLUDED = KNOWN_VIOLATIONS | BY_DESIGN_EXCLUSIONS
-
def _get_init_param_names(func: ast.FunctionDef) -> set[str]:
"""Return the names of reconstructable __init__ parameters
(``*args``/``**kwargs`` excluded)."""
@@ -223,7 +207,7 @@ class ModuleAnalyzer:
results: list[tuple[str, list[str]]] = []
rel = self.path.relative_to(AIRFLOW_PROVIDERS_ROOT_PATH).as_posix()
for name, cls in self.classes.items():
- if f"{rel}::{name}" in _EXCLUDED:
+ if f"{rel}::{name}" in BY_DESIGN_EXCLUSIONS:
continue
if not self.is_trigger(cls):
continue