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 2022/09/13 04:29:20 UTC

[GitHub] [airflow] jharner11235 commented on a diff in pull request #26027: import_error_alert_emails

jharner11235 commented on code in PR #26027:
URL: https://github.com/apache/airflow/pull/26027#discussion_r969138091


##########
airflow/dag_processing/processor.py:
##########
@@ -549,6 +549,17 @@ def update_import_errors(session: Session, dagbag: DagBag) -> None:
                     synchronize_session='fetch',
                 )
             else:
+                emails: Set[str] = set(conf.get(section='email', key='dag_import_failure_email_to').split())
+                if emails and conf.getboolean(
+                    section='email', key='email_on_dag_import_failure', fallback=True
+                ):
+                    try:
+                        email_content = f"""File {filename} has failed to import due to:\n
+                        <pre><code>{stacktrace}<code></pre>

Review Comment:
   The emails show up and look as expected, it does seem to be HTML



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