DaveT1991 opened a new pull request, #64993: URL: https://github.com/apache/airflow/pull/64993
## Summary Skip notifier templating setup when a notifier does not define any template fields. When `airflow dags test` executes DAG callbacks, the callback context can include a `SerializedDAG`. `BaseNotifier.render_template_fields()` currently always requests a template environment from the context DAG, even when there is nothing to render. For notifiers that rely on the default empty `template_fields`, that raises `AttributeError` before the callback can run. This change returns early when `template_fields` is empty and adds a regression test that exercises a notifier callback with a serialized DAG context. Closes #64649 ## Testing - Added a regression test in `task-sdk/tests/task_sdk/bases/test_notifier.py` - `git diff --check` - I could not run Python or `uv`-based test commands in this environment because those tools are not installed here -- 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]
