Re: [I] Fix provider triggers whose serialize() drops __init__ parameters [airflow]
shahar1 closed issue #66961: Fix provider triggers whose serialize() drops __init__ parameters URL: https://github.com/apache/airflow/issues/66961 -- 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]
Re: [I] Fix provider triggers whose serialize() drops __init__ parameters [airflow]
abhid-007 commented on issue #66961: URL: https://github.com/apache/airflow/issues/66961#issuecomment-4459106288 Quick correction to the comment above — the agent draft was posted without the attribution footer the repo asks for. Adding it here: --- Drafted-by: Claude Code (Opus 4.7); reviewed by @abhid-007 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]
Re: [I] Fix provider triggers whose serialize() drops __init__ parameters [airflow]
abhid-007 commented on issue #66961: URL: https://github.com/apache/airflow/issues/66961#issuecomment-4459100698 Picking up `BigQueryIntervalCheckTrigger` (the last of the five) — looks like @Nishieee has the other four covered in #66965 / #66966 / #66968 / and the Databricks Run trigger. Will keep the PR narrow to this single trigger and cross-reference #66960 so the `KNOWN_VIOLATIONS` entry can be removed from that side once both land. -- 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]
Re: [I] Fix provider triggers whose serialize() drops __init__ parameters [airflow]
shahar1 commented on issue #66961: URL: https://github.com/apache/airflow/issues/66961#issuecomment-4453736605 > I’d love to work on this issue. > > I’ll align each trigger’s serialize() return dict with its **init** parameters (adding any missing fields like caller / poll_interval / endpoint_prefix, storing values on self where needed) and add focused unit tests that round-trip serialize() --> **kwargs --> reinstantiation. Once the static check is clean, I’ll remove the corresponding entries from KNOWN_VIOLATIONS. Thank you, feel free to raise PRs. -- 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]
Re: [I] Fix provider triggers whose serialize() drops __init__ parameters [airflow]
Nishieee commented on issue #66961: URL: https://github.com/apache/airflow/issues/66961#issuecomment-4453577407 I’d love to work on this issue. I’ll align each trigger’s serialize() return dict with its __init__ parameters (adding any missing fields like caller / poll_interval / endpoint_prefix, storing values on self where needed) and add focused unit tests that round-trip serialize() --> **kwargs --> reinstantiation. Once the static check is clean, I’ll remove the corresponding entries from KNOWN_VIOLATIONS. -- 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]
[I] Fix provider triggers whose serialize() drops __init__ parameters [airflow]
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]
