Taragolis commented on code in PR #27616:
URL: https://github.com/apache/airflow/pull/27616#discussion_r1094709928
##########
airflow/models/taskinstance.py:
##########
@@ -1808,13 +1808,13 @@ def handle_failure(
except Exception:
self.log.exception("Failed to send email to: %s", task.email)
- if callback and context:
- self._run_finished_callback(callback, context, callback_type)
-
if not test_mode:
session.merge(self)
session.flush()
+ if callback and context:
+ self._run_finished_callback(callback, context, callback_type)
+
Review Comment:
Anyway, if other decided than Option 2 or Option 1 better than current
Option 3 than I would dismiss change request.
IMHO, we can't do anything better:
- without refactor TI + LocalTaskJob
- or decouple callback outside of Task Execution
- or even transform all callbacks (and email notifiers) to some simple
version of TI and execute as regular tasks in worker
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]