-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AIRFLOW-6535] Add AirflowFailException to fail without any retry (#7133
) * use preferred boolean check idiom Co-Authored-By: Jarek Potiuk <[email protected]> * add test coverage for AirflowFailException * add docs for some exception usage patterns * autoformatting * remove extraneous newline, poke travis build * clean up TaskInstance.handle_failure Try to reduce nesting and repetition of logic for different conditions. Also try to tighten up the scope of the exception handling ... it looks like the large block that catches an Exception and logs it as a failure to send an email may have been swallowing some TypeErrors coming out of trying to compose a log info message and calling strftime on start_date and end_date when they're set to None; this is why I've added lines in the test to set those values on the TaskInstance objects. * let sphinx generate docs for exceptions module * keep session kwarg last in handle_failure * explain allowed_top_level * add black-box tests for retry/fail immediately cases * don't lose safety measures in logging date attrs * fix flake8 too few blank lines * grammar nitpick * add import to AirflowFailException example Co-authored-by: Jarek Potiuk <[email protected]>
- Loading branch information
Showing
6 changed files
with
178 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters