GitHub user jaketf created a discussion: import error alert emails

**Description**

Send alert emails on import errors.

**Use case / motivation**
This is a feature will be especially useful for admins who use 
`ClusterPolicyViolation` or those who have pesky folks that push bad DAGs 
cluttering the UI with notifications that should be triaged to the on-call.

**Related Issues**
I believe that the `import_errors` is a sad place in the airflow codebase and 
now might be the time to refactor this.
I have questions about how to best keep track of import error emails we have 
sent (as to not spam the recipients with emails every scheduler loop).

It seems to me we can either keep history of import errors in the existing 
table (this would require a fundamental change to the scheduler logic which 
clears this table on each loop and a change to how the UI uses this table) or 
create a new table (e.g. `import_error_history` which has a bool field for 
email_sent) for this purpose.

I'm curious to hear from community if there are other use cases / improvements 
we should consider in refactoring the import errors.

cc: @mik-laj 

GitHub link: https://github.com/apache/airflow/discussions/53660

----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscr...@airflow.apache.org

Reply via email to