airflow icon indicating copy to clipboard operation
airflow copied to clipboard

import_error_alert_emails

Open jharner11235 opened this issue 3 years ago • 4 comments

This adds functionality to notify a list of emails if a dag fails to import, and uses a variable in airflow.cfg to assign emails to be notified (instead of attempting to parse a broken dag for emails, which may at times be unviable)

closes: #10968

^ 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.rst or {issue_number}.significant.rst, in newsfragments.

jharner11235 avatar Aug 29 '22 00:08 jharner11235

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst) Here are some useful points:

  • Pay attention to the quality of your code (flake8, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style. Apache Airflow is a community-driven project and together we are making it better 🚀. In case of doubts contact the developers at: Mailing List: [email protected] Slack: https://s.apache.org/airflow-slack

boring-cyborg[bot] avatar Aug 29 '22 00:08 boring-cyborg[bot]

I'm looking for some guidance in how to apply tests, I've yet to do any testing whatsoever near the scale present here and am quite lost.

And of course, anything goes on the already-written code as well :) happy to make any changes seen fit

jharner11235 avatar Aug 29 '22 00:08 jharner11235

I don't think it's cool to get alerts of broken dags every 5mins? WDYT @jharner11235

ephraimbuddy avatar Aug 31 '22 06:08 ephraimbuddy

I don't think it's cool to get alerts of broken dags every 5mins? WDYT @jharner11235

I didn't get an alert every 5 minutes in any of my testing, given where the changes are made if alerts were being sent every 5mins then alerts would also be inserted into the database every 5mins, and I didn't see that occurring either

Edit: I'm currently testing again to verify, as well as addressing the now-failing checks. I also changed the default to be False, it doesn't make sense to have notifications defaulted to True if a user has to add their email in order to get emails (even though it uses SMTP to message if available)

jharner11235 avatar Aug 31 '22 16:08 jharner11235

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Dec 09 '22 00:12 github-actions[bot]