vatsrahul1001 opened a new pull request, #73326:
URL: https://github.com/apache/airflow/pull/73326

   ## What
   
   Airflow 3.2.0 (#57215) moved the deadline-alert async callback trigger from 
`airflow.triggers.deadline.DeadlineCallbackTrigger` to 
`airflow.triggers.callback.CallbackTrigger` **without leaving a compatibility 
shim** — unlike the other trigger moves already handled in 
`airflow.triggers.__init__` (`file`, `temporal`, `external_task`).
   
   A triggerer that resolves a trigger serialized under the old classpath 
therefore fails to import it:
   
   ```
   Trigger failed to load code  
classpath=airflow.triggers.callback.CallbackTrigger
   error=ModuleNotFoundError("No module named 'airflow.triggers.callback'")
   ```
   
   (the inverse — a newer triggerer loading a trigger persisted under the old 
classpath — hits the same wall.)
   
   ## Change
   
   Register the old classpath via the existing `add_deprecated_classes` 
mechanism so `airflow.triggers.deadline.DeadlineCallbackTrigger` stays 
importable, redirecting to `CallbackTrigger` with a `DeprecatedImportWarning` — 
matching how `file`/`temporal`/`external_task` moves are handled. The two 
trigger classes have identical constructor signatures (`callback_path`, 
`callback_kwargs`), so the redirect is a drop-in.
   
   Adds a regression test that loads the old classpath via `import_string` (the 
same call the triggerer uses) and a newsfragment.
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 4.8)
   
   Generated-by: Claude Code (Opus 4.8) following [the 
guidelines](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]

Reply via email to