lazerg commented on code in PR #76534:
URL: https://github.com/apache/airflow/pull/76534#discussion_r4545153104
##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:
##########
@@ -718,7 +718,11 @@ def ti_update_state(
query = TI.duration_expression_update(timezone.utcnow(), query,
session.bind)
query = query.values(state=(updated_state := TaskInstanceState.FAILED))
if ti is not None:
- _handle_fail_fast_for_dag(ti=ti, dag_id=dag_id, session=session,
dag_bag=dag_bag)
+ try:
+ with session.begin_nested():
+ _handle_fail_fast_for_dag(ti=ti, dag_id=dag_id,
session=session, dag_bag=dag_bag)
+ except Exception:
+ log.exception("Failed to apply fail_fast while setting the
task to failed")
Review Comment:
Thanks, I reproduced it with your test and applied the suggestion in
de2c597e65, plus your test.
---
Drafted-by: Claude Code (Claude Opus 5.5) (no human review before posting)
--
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]