You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ITJamie (via GitHub)" <gi...@apache.org> on 2023/05/11 13:57:44 UTC
[GitHub] [airflow] ITJamie opened a new issue, #31211: emailoperator with connection, not pulling from_email/smtp_mail_from, prefering airflow.cfg variable
ITJamie opened a new issue, #31211:
URL: https://github.com/apache/airflow/issues/31211
### Apache Airflow version
2.6.0
### What happened
the email operator when used with a connection is hard coded to use the smtp/smtp_mail_from and email/from_email variables from the airflow configuration. this should be adjusted to check if the connection has these vars set and prefer those instead.
there is a warning about configuration of email from airflow configuration being unsupported soon, so these config vars need to be supported in connections
### What you think should happen instead
if smtp_mail_from and from_email are set in extra_vars on a connection it should prefer those
### How to reproduce
lines which need to be adjusted to support connection based vars:
- https://github.com/apache/airflow/blob/d4dc73416a652a895ada6484d67879a1aad5f0bb/airflow/utils/email.py#L73
- https://github.com/apache/airflow/blob/d4dc73416a652a895ada6484d67879a1aad5f0bb/airflow/utils/email.py#L128
setup airflow.cfg with incorrect smtp/smtp_mail_from and email/from_email variables.
attempt to override these with variables on an email connection
use the emailoperator with the new connection to send an email
see that the email was sent with the variables set in airflow.cfg
### Operating System
Debian GNU/Linux 11 (bullseye)
### Versions of Apache Airflow Providers
_No response_
### Deployment
Docker-Compose
### Deployment details
bitnami containers on baremetal debian with docker-compose
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] arjunanan6 commented on issue #31211: emailoperator with connection, missing config variable support (from_email), prefering airflow.cfg variable
Posted by "arjunanan6 (via GitHub)" <gi...@apache.org>.
arjunanan6 commented on issue #31211:
URL: https://github.com/apache/airflow/issues/31211#issuecomment-1545092601
I would like to take this one, it seems do-able! :)
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] emailoperator with connection, missing config variable support (from_email), prefering airflow.cfg variable [airflow]
Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil commented on issue #31211:
URL: https://github.com/apache/airflow/issues/31211#issuecomment-5942900780
The core EmailOperator this describes was removed in Airflow 3.0 (#46573) in favour of the SMTP provider's EmailOperator, which uses the from_email set on the SMTP connection when the task does not pass one. Airflow 2 reached end of life in April 2026, so we're closing this.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] emailoperator with connection, missing config variable support (from_email), prefering airflow.cfg variable [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #31211:
URL: https://github.com/apache/airflow/issues/31211#issuecomment-3986499972
@ITJamie We are unassigning you from this issue as part of our updated [assignment policy](https://github.com/apache/airflow/blob/main/contributing-docs/04_how_to_contribute.rst#contribute-code-changes).
This is not meant to discourage your contribution — quite the opposite! You are still very welcome to work on this issue and submit a PR for it. Simply comment that you are working on it and open a PR when ready.
We found that formal assignments were not working well, as they often prevented others from contributing when the assignee was not actively working on the issue.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] hussein-awala commented on issue #31211: emailoperator with connection, missing config variable support (from_email), prefering airflow.cfg variable
Posted by "hussein-awala (via GitHub)" <gi...@apache.org>.
hussein-awala commented on issue #31211:
URL: https://github.com/apache/airflow/issues/31211#issuecomment-1546861394
Configuring the email operator and email util through Airflow configuration will soon be deprecated. It will be highly recommended to configure them via Airflow connections, as this approach will be fully supported.
There is already an open issue and linked PR for the Email operator #30530, and I'm trying to do the same thing for the `send_email` util. I am a bit late on this topic as I was very busy with other tasks during the past two weeks. However, I will make an effort to complete it before version 2.6.2.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] emailoperator with connection, missing config variable support (from_email), prefering airflow.cfg variable [airflow]
Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil closed issue #31211: emailoperator with connection, missing config variable support (from_email), prefering airflow.cfg variable
URL: https://github.com/apache/airflow/issues/31211
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #31211: emailoperator with connection, missing config variable support (from_email), prefering airflow.cfg variable
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #31211:
URL: https://github.com/apache/airflow/issues/31211#issuecomment-1545198747
Assigned you, but there is another related in #31219 and likley also it needs to hold on a bit as @hussein-awala does refactoring of the email operator, so maybe it will end up with all of the people involved here reviewing and commenting single PR of @hussein-awala to see if we can improve some cases (cc: @eladkal as well).
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] arjunanan6 commented on issue #31211: emailoperator with connection, missing config variable support (from_email), prefering airflow.cfg variable
Posted by "arjunanan6 (via GitHub)" <gi...@apache.org>.
arjunanan6 commented on issue #31211:
URL: https://github.com/apache/airflow/issues/31211#issuecomment-1552971863
@potiuk This should probably be assigned to @ITJamie as they're already working on it. I didn't realize there was a pull request already.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org