Uh oh!
There was an error while loading. Please reload this page.
Replace send_email from utils in task SDK with its own - #55769
Replace send_email from utils in task SDK with its own#55769amoghrajesh wants to merge 2 commits into
Conversation
ashb
left a comment
There was a problem hiding this comment.
I wonder if we could replace this with the SMTP provider's SmtpNotifier in some way?
It seems odd to have two different ways of sending email.
We could fail at parse time if you set email_on_failure = True and the smtp provider can't be imported?
amoghrajesh
commented
Sep 17, 2025
@ashb we could, but do we want to create a dependency between task sdk and smtp provider? I did this to avoid that |
ashb
commented
Sep 17, 2025
I think there is a qausi-dep there already -- SMTP provider was core, and you can define the credentials in an SMTP connection inside Airflow, can't you? This doesn't need to be a hard (i.e. pyproject-level) dependency |
ashb
commented
Sep 17, 2025
I've thought about it before, and changing |
kaxil
commented
Sep 17, 2025
eladkal
commented
Sep 23, 2025
I am really not sure where are we going with the email/smtp integration. |
ashb
commented
Sep 23, 2025
Lets not port this over then. Instead lets "upgrade in place" the use of I'll leave @amoghrajesh do decide if this PR gets closed or re-purposed. |
amoghrajesh
commented
Oct 15, 2025
Thanks for all your comment, let's repurpose the existing SMTP notifier to do the email sending portion for us |
amoghrajesh
commented
Nov 6, 2025
Closing in favour of #57354 |
closes: #54712
Why?
Task SDK uses the ability to send emails but it imports it from airflow.utils. As part of client server separation, getting rid of these imports in task sdk. This PR moves the _send_email function from utils to the task runner module to consolidate email-related functionality where it's actually used.
Changes
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.