shahar1 opened a new issue, #66961:
URL: https://github.com/apache/airflow/issues/66961

   ### Body
   
   A trigger's `__init__` and `serialize()` are written as a pair: every 
`__init__` parameter must appear in the `serialize()` return dict, otherwise it 
is silently dropped when the triggerer re-instantiates the trigger and falls 
back to the parameter's default. See 
[deferring.rst](https://github.com/apache/airflow/blob/main/airflow-core/docs/authoring-and-scheduling/deferring.rst).
   
   The new `check-trigger-serialize-init` static check (added in #66960) flags 
this class of bug. It found 5 pre-existing genuine violations, which are 
currently allowlisted in `KNOWN_VIOLATIONS` in 
`scripts/ci/prek/check_trigger_serialize_init.py` so the check could be 
enabled. This issue tracks fixing them and removing them from the allowlist.
   
   For each trigger below: add the missing parameter(s) to the `serialize()` 
return dict, add/extend a serialization unit test asserting the parameter 
round-trips, and remove the entry from `KNOWN_VIOLATIONS`.
   
   ### Checklist
   
   - [ ] `DatabricksExecutionTrigger` — `caller` missing 
(`providers/databricks/src/airflow/providers/databricks/triggers/databricks.py`)
   - [ ] `DatabricksSQLStatementExecutionTrigger` — `caller` missing 
(`providers/databricks/src/airflow/providers/databricks/triggers/databricks.py`)
   - [ ] `BigQueryIntervalCheckTrigger` — `dataset_id`, `table_id`, 
`poll_interval` missing 
(`providers/google/src/airflow/providers/google/cloud/triggers/bigquery.py`)
   - [ ] `DataFusionStartPipelineTrigger` — `poll_interval`, 
`impersonation_chain` missing 
(`providers/google/src/airflow/providers/google/cloud/triggers/datafusion.py`)
   - [ ] `LivyTrigger` — `endpoint_prefix` missing 
(`providers/apache/livy/src/airflow/providers/apache/livy/triggers/livy.py`)
   - [ ] Remove all fixed entries from `KNOWN_VIOLATIONS` in 
`scripts/ci/prek/check_trigger_serialize_init.py` (the set should end up empty)
   
   ### Notes
   
   These can be fixed individually (one PR per trigger / provider) or together. 
Note that `BY_DESIGN_EXCLUSIONS` in the same file is intentionally permanent 
and should **not** be touched — those cases (`TimeDeltaTrigger`, 
`GKEJobTrigger`, `KubernetesJobTrigger`) fold a deprecated/aliased parameter 
into its replacement at construction time and are correct as-is.
   
   Related: #66960
   
   ---
   Drafted-by: Claude Code (Sonnet 4.6) (no human review before posting)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to