potiuk opened a new pull request, #67926: URL: https://github.com/apache/airflow/pull/67926
When loading a serialized DAG, the `BASE_TRIGGER` deserialization branch in `BaseSerialization.deserialize` imported the stored class path and instantiated it without checking it is actually a `BaseTrigger` subclass. This restricts that path to `BaseTrigger` subclasses (raising `ValueError` otherwise), matching the encode side which only emits `BASE_TRIGGER` for `BaseTrigger` instances. ### Tests - [x] Added `test_base_trigger_deserialization_rejects_non_trigger_class` — a non-`BaseTrigger` class path is rejected. - [x] Existing `test_trigger_kwargs_not_deserialised_through_serdag` still passes. ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Opus 4.8 (1M context) Generated-by: Claude Opus 4.8 (1M context) following the guidelines at https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions -- 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]
