jstern commented on a change in pull request #7133: [AIRFLOW-6535] add
exception to fail without retry
URL: https://github.com/apache/airflow/pull/7133#discussion_r370800512
##########
File path: airflow/models/taskinstance.py
##########
@@ -1120,10 +1125,33 @@ def handle_failure(self, error, test_mode=None,
context=None, session=None):
# only mark task instance as FAILED if the next task instance
# try_number exceeds the max_tries.
if self.is_eligible_to_retry():
- self.state = State.UP_FOR_RETRY
- self.log.info('Marking task as UP_FOR_RETRY')
- if task.email_on_retry and task.email:
- self.email_alert(error)
+ if not force_fail:
Review comment:
yeah, the messiness of the nesting was weighing on me a bit when i made
[this
comment](https://github.com/apache/airflow/pull/7133#issuecomment-573155093)
above, but what I was thinking of then wouldn't have worked because we still
want all the callbacks to fire. I'll take a look at implementing your suggestion
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services