You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2023/01/10 22:55:46 UTC

[GitHub] [airflow] curlup opened a new pull request, #28845: Email Config docs more explicit env var examples

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

   Small improvements to the docs, because it took me couple hours to figure out that env var usage was possible for email config. 


-- 
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] uranusjr commented on a diff in pull request #28845: Email Config docs more explicit env var examples

Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #28845:
URL: https://github.com/apache/airflow/pull/28845#discussion_r1073079886


##########
docs/apache-airflow/howto/email-config.rst:
##########
@@ -29,7 +29,27 @@ in the ``[email]`` section.
   subject_template = /path/to/my_subject_template_file
   html_content_template = /path/to/my_html_content_template_file
 
-You can configure sender's email address by setting ``from_email`` in the ``[email]`` section.
+Equivalent environment variables look like:
+
+.. code-block:: sh
+
+  AIRFLOW__EMAIL__EMAIL_BACKEND=airflow.utils.email.send_email_smtp
+  AIRFLOW__EMAIL__SUBJECT_TEMPLATE=/path/to/my_subject_template_file
+  AIRFLOW__EMAIL__HTML_CONTENT_TEMPLATE=/path/to/my_html_content_template_file
+
+You can configure a sender's email address by setting ``from_email`` in the ``[email]`` section like:
+
+.. code-block:: ini
+
+  [email]
+  from_email = "email@example.com"
+
+Equivalent environment variables look like:
+
+.. code-block:: sh
+
+  AIRFLOW__EMAIL__FROM_EMAIL="John Doe <jo...@example.com>"

Review Comment:
   These are no longer equivalents



-- 
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] BasPH commented on a diff in pull request #28845: Email Config docs more explicit env var examples

Posted by GitBox <gi...@apache.org>.
BasPH commented on code in PR #28845:
URL: https://github.com/apache/airflow/pull/28845#discussion_r1070106261


##########
docs/apache-airflow/howto/email-config.rst:
##########
@@ -29,7 +29,27 @@ in the ``[email]`` section.
   subject_template = /path/to/my_subject_template_file
   html_content_template = /path/to/my_html_content_template_file
 
-You can configure sender's email address by setting ``from_email`` in the ``[email]`` section.
+Equivalent environment variables look like:
+
+.. code-block::
+
+  AIRFLOW__EMAIL__EMAIL_BACKEND=airflow.utils.email.send_email_smtp
+  AIRFLOW__EMAIL__SUBJECT_TEMPLATE=/path/to/my_subject_template_file
+  AIRFLOW__EMAIL__HTML_CONTENT_TEMPLATE=/path/to/my_html_content_template_file
+
+You can configure a sender's email address by setting ``from_email`` in the ``[email]`` section like:
+
+.. code-block:: ini
+
+  [email]
+  from_email = "email@example.com"
+
+Equivalent environment variables look like:
+
+.. code-block::
+
+  AIRFLOW__EMAIL__FROM_EMAIL="From email <em...@example.com>"

Review Comment:
   ```suggestion
     AIRFLOW__EMAIL__FROM_EMAIL="email@example.com"
   ```
   
   Would show a valid email structure here too



-- 
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] uranusjr merged pull request #28845: Email Config docs more explicit env var examples

Posted by "uranusjr (via GitHub)" <gi...@apache.org>.
uranusjr merged PR #28845:
URL: https://github.com/apache/airflow/pull/28845


-- 
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] uranusjr commented on a diff in pull request #28845: Email Config docs more explicit env var examples

Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #28845:
URL: https://github.com/apache/airflow/pull/28845#discussion_r1070989250


##########
docs/apache-airflow/howto/email-config.rst:
##########
@@ -29,7 +29,27 @@ in the ``[email]`` section.
   subject_template = /path/to/my_subject_template_file
   html_content_template = /path/to/my_html_content_template_file
 
-You can configure sender's email address by setting ``from_email`` in the ``[email]`` section.
+Equivalent environment variables look like:
+
+.. code-block::

Review Comment:
   ```suggestion
   .. code-block:: sh
   ```



-- 
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] uranusjr commented on pull request #28845: Email Config docs more explicit env var examples

Posted by GitBox <gi...@apache.org>.
uranusjr commented on PR #28845:
URL: https://github.com/apache/airflow/pull/28845#issuecomment-1378301643

   Static checks are also failing, looks like trailing whitespaces?


-- 
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] uranusjr commented on a diff in pull request #28845: Email Config docs more explicit env var examples

Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #28845:
URL: https://github.com/apache/airflow/pull/28845#discussion_r1070991065


##########
docs/apache-airflow/howto/email-config.rst:
##########
@@ -29,7 +29,27 @@ in the ``[email]`` section.
   subject_template = /path/to/my_subject_template_file
   html_content_template = /path/to/my_html_content_template_file
 
-You can configure sender's email address by setting ``from_email`` in the ``[email]`` section.
+Equivalent environment variables look like:
+
+.. code-block::
+
+  AIRFLOW__EMAIL__EMAIL_BACKEND=airflow.utils.email.send_email_smtp
+  AIRFLOW__EMAIL__SUBJECT_TEMPLATE=/path/to/my_subject_template_file
+  AIRFLOW__EMAIL__HTML_CONTENT_TEMPLATE=/path/to/my_html_content_template_file
+
+You can configure a sender's email address by setting ``from_email`` in the ``[email]`` section like:
+
+.. code-block:: ini
+
+  [email]
+  from_email = "email@example.com"
+
+Equivalent environment variables look like:
+
+.. code-block::
+
+  AIRFLOW__EMAIL__FROM_EMAIL="From email <em...@example.com>"

Review Comment:
   The config name is sort of a misnomer, the field is used by the email’s `From:` field, which takes a RFC 5321 address, not an email address. `From email <em...@example.com>` is perfectly valid 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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] BasPH commented on a diff in pull request #28845: Email Config docs more explicit env var examples

Posted by GitBox <gi...@apache.org>.
BasPH commented on code in PR #28845:
URL: https://github.com/apache/airflow/pull/28845#discussion_r1068582637


##########
docs/apache-airflow/howto/email-config.rst:
##########
@@ -29,7 +29,27 @@ in the ``[email]`` section.
   subject_template = /path/to/my_subject_template_file
   html_content_template = /path/to/my_html_content_template_file
 
-You can configure sender's email address by setting ``from_email`` in the ``[email]`` section.
+Equivalent environment variables looks like

Review Comment:
   ```suggestion
   Equivalent environment variables look like:
   ```



##########
docs/apache-airflow/howto/email-config.rst:
##########
@@ -29,7 +29,27 @@ in the ``[email]`` section.
   subject_template = /path/to/my_subject_template_file
   html_content_template = /path/to/my_html_content_template_file
 
-You can configure sender's email address by setting ``from_email`` in the ``[email]`` section.
+Equivalent environment variables looks like
+
+.. code-block::
+
+  AIRFLOW__EMAIL__EMAIL_BACKEND=airflow.utils.email.send_email_smtp
+  AIRFLOW__EMAIL__SUBJECT_TEMPLATE=/path/to/my_subject_template_file
+  AIRFLOW__EMAIL__HTML_CONTENT_TEMPLATE=/path/to/my_html_content_template_file
+
+You can configure sender's email address by setting ``from_email`` in the ``[email]`` section like

Review Comment:
   ```suggestion
   You can configure a sender's email address by setting ``from_email`` in the ``[email]`` section like:
   ```



##########
docs/apache-airflow/howto/email-config.rst:
##########
@@ -29,7 +29,27 @@ in the ``[email]`` section.
   subject_template = /path/to/my_subject_template_file
   html_content_template = /path/to/my_html_content_template_file
 
-You can configure sender's email address by setting ``from_email`` in the ``[email]`` section.
+Equivalent environment variables looks like
+
+.. code-block::
+
+  AIRFLOW__EMAIL__EMAIL_BACKEND=airflow.utils.email.send_email_smtp
+  AIRFLOW__EMAIL__SUBJECT_TEMPLATE=/path/to/my_subject_template_file
+  AIRFLOW__EMAIL__HTML_CONTENT_TEMPLATE=/path/to/my_html_content_template_file
+
+You can configure sender's email address by setting ``from_email`` in the ``[email]`` section like
+
+.. code-block:: ini
+
+  [email]
+  from_email = From email <em...@example.com>
+
+Equivalent environment variables looks like

Review Comment:
   ```suggestion
   Equivalent environment variables look like:
   ```



##########
docs/apache-airflow/howto/email-config.rst:
##########
@@ -29,7 +29,27 @@ in the ``[email]`` section.
   subject_template = /path/to/my_subject_template_file
   html_content_template = /path/to/my_html_content_template_file
 
-You can configure sender's email address by setting ``from_email`` in the ``[email]`` section.
+Equivalent environment variables looks like
+
+.. code-block::
+
+  AIRFLOW__EMAIL__EMAIL_BACKEND=airflow.utils.email.send_email_smtp
+  AIRFLOW__EMAIL__SUBJECT_TEMPLATE=/path/to/my_subject_template_file
+  AIRFLOW__EMAIL__HTML_CONTENT_TEMPLATE=/path/to/my_html_content_template_file
+
+You can configure sender's email address by setting ``from_email`` in the ``[email]`` section like
+
+.. code-block:: ini
+
+  [email]
+  from_email = From email <em...@example.com>

Review Comment:
   ```suggestion
     from_email = "email@example.com"
   ```
   
   Would remove "From email" to show a valid email structure.



-- 
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] curlup commented on a diff in pull request #28845: Email Config docs more explicit env var examples

Posted by GitBox <gi...@apache.org>.
curlup commented on code in PR #28845:
URL: https://github.com/apache/airflow/pull/28845#discussion_r1072832449


##########
docs/apache-airflow/howto/email-config.rst:
##########
@@ -29,7 +29,27 @@ in the ``[email]`` section.
   subject_template = /path/to/my_subject_template_file
   html_content_template = /path/to/my_html_content_template_file
 
-You can configure sender's email address by setting ``from_email`` in the ``[email]`` section.
+Equivalent environment variables look like:
+
+.. code-block:: sh
+
+  AIRFLOW__EMAIL__EMAIL_BACKEND=airflow.utils.email.send_email_smtp
+  AIRFLOW__EMAIL__SUBJECT_TEMPLATE=/path/to/my_subject_template_file
+  AIRFLOW__EMAIL__HTML_CONTENT_TEMPLATE=/path/to/my_html_content_template_file
+
+You can configure a sender's email address by setting ``from_email`` in the ``[email]`` section like:
+
+.. code-block:: ini
+
+  [email]
+  from_email = "email@example.com"
+
+Equivalent environment variables look like:
+
+.. code-block::
+
+AIRFLOW__EMAIL__FROM_EMAIL="John Doe <jo...@example.com>"

Review Comment:
   ```suggestion
   .. code-block:: sh
   
     AIRFLOW__EMAIL__FROM_EMAIL="John Doe <jo...@example.com>"
   ```



-- 
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 a diff in pull request #28845: Email Config docs more explicit env var examples

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #28845:
URL: https://github.com/apache/airflow/pull/28845#discussion_r1066481456


##########
docs/apache-airflow/howto/email-config.rst:
##########
@@ -28,8 +28,28 @@ in the ``[email]`` section.
   email_backend = airflow.utils.email.send_email_smtp
   subject_template = /path/to/my_subject_template_file
   html_content_template = /path/to/my_html_content_template_file
+  
+Equivalent environment variables looks like
+
+.. code-block::
+
+  AIRFLOW__EMAIL__EMAIL_BACKEND=airflow.utils.email.send_email_smtp
+  AIRFLOW__EMAIL__SUBJECT_TEMPLATE=/path/to/my_subject_template_file
+  AIRFLOW__EMAIL__HTML_CONTENT_TEMPLATE=/path/to/my_html_content_template_file
+
+You can configure sender's email address by setting ``from_email`` in the ``[email]`` section like
+
+.. code-block:: ini
+
+  [email]
+  from_email = From email <em...@example.com>
+
+Equivalent environment variables looks like
+
+.. code-block::
 
-You can configure sender's email address by setting ``from_email`` in the ``[email]`` section.
+  AIRFLOW__EMAIL__FROM_EMAIL=From email <em...@example.com>

Review Comment:
   ```suggestion
     AIRFLOW__EMAIL__FROM_EMAIL="From email <em...@example.com>"
   ```



-- 
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] BasPH commented on a diff in pull request #28845: Email Config docs more explicit env var examples

Posted by GitBox <gi...@apache.org>.
BasPH commented on code in PR #28845:
URL: https://github.com/apache/airflow/pull/28845#discussion_r1071001711


##########
docs/apache-airflow/howto/email-config.rst:
##########
@@ -29,7 +29,27 @@ in the ``[email]`` section.
   subject_template = /path/to/my_subject_template_file
   html_content_template = /path/to/my_html_content_template_file
 
-You can configure sender's email address by setting ``from_email`` in the ``[email]`` section.
+Equivalent environment variables look like:
+
+.. code-block::
+
+  AIRFLOW__EMAIL__EMAIL_BACKEND=airflow.utils.email.send_email_smtp
+  AIRFLOW__EMAIL__SUBJECT_TEMPLATE=/path/to/my_subject_template_file
+  AIRFLOW__EMAIL__HTML_CONTENT_TEMPLATE=/path/to/my_html_content_template_file
+
+You can configure a sender's email address by setting ``from_email`` in the ``[email]`` section like:
+
+.. code-block:: ini
+
+  [email]
+  from_email = "email@example.com"
+
+Equivalent environment variables look like:
+
+.. code-block::
+
+  AIRFLOW__EMAIL__FROM_EMAIL="From email <em...@example.com>"

Review Comment:
   Wow, that's very unexpected, but thanks for clarifying. We could at least make it slightly less confusing by providing an example name, because showing `From email` does not tell the reader the expected value IMO. For example:
   
   ```
   AIRFLOW__EMAIL__FROM_EMAIL=John Doe <"johndoe@example.com">
   ```



-- 
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] curlup commented on a diff in pull request #28845: Email Config docs more explicit env var examples

Posted by GitBox <gi...@apache.org>.
curlup commented on code in PR #28845:
URL: https://github.com/apache/airflow/pull/28845#discussion_r1072830069


##########
docs/apache-airflow/howto/email-config.rst:
##########
@@ -29,7 +29,27 @@ in the ``[email]`` section.
   subject_template = /path/to/my_subject_template_file
   html_content_template = /path/to/my_html_content_template_file
 
-You can configure sender's email address by setting ``from_email`` in the ``[email]`` section.
+Equivalent environment variables look like:
+
+.. code-block::
+
+  AIRFLOW__EMAIL__EMAIL_BACKEND=airflow.utils.email.send_email_smtp
+  AIRFLOW__EMAIL__SUBJECT_TEMPLATE=/path/to/my_subject_template_file
+  AIRFLOW__EMAIL__HTML_CONTENT_TEMPLATE=/path/to/my_html_content_template_file
+
+You can configure a sender's email address by setting ``from_email`` in the ``[email]`` section like:
+
+.. code-block:: ini
+
+  [email]
+  from_email = "email@example.com"
+
+Equivalent environment variables look like:
+
+.. code-block::
+
+  AIRFLOW__EMAIL__FROM_EMAIL="From email <em...@example.com>"

Review Comment:
   ```suggestion
   AIRFLOW__EMAIL__FROM_EMAIL="John Doe <jo...@example.com>"
   ```



-- 
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