github-actions[bot] opened a new pull request, #70129:
URL: https://github.com/apache/airflow/pull/70129
Since #57354, task email_on_failure / email_on_retry alerts were routed
unconditionally through SmtpNotifier, silently ignoring the
[email] email_backend configuration. Custom backends (SES, SendGrid,
org-internal) stopped delivering failure/retry emails even though the
deprecated email_on_* parameters still worked.
This restores the old behaviour using the existing [email] email_backend
option -- no new configuration is introduced:
- A non-default [email] email_backend is transparently wrapped in a new
LegacyEmailBackendNotifier, so existing SES / SendGrid / custom backends
keep delivering alerts unchanged. The backend is resolved from config at
notify time, so the Task SDK keeps no static dependency on
airflow.utils.email.
- Otherwise the default SmtpNotifier is used, exactly as before.
The notifier lives in the Task SDK (airflow.sdk.execution_time.email_backend)
next to its only caller, so no extra provider needs to be installed for a
custom email backend to keep working.
Both failure-email entry points (the worker task-runner path and the
DAG-processor callback path) funnel through the same function, so the
selected backend is used consistently regardless of how the task failed.
The deprecated email_on_* parameters are not un-deprecated; this only keeps
their existing behaviour pluggable until removal in Airflow 4.
(cherry picked from commit f7dec02b2a9d88e886d0d3b2fd1919edbf2ff8af)
Co-authored-by: Jarek Potiuk <[email protected]>
--
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]