dheerenmohta opened a new pull request, #72794:
URL: https://github.com/apache/airflow/pull/72794

   When a Dag has `fail_fast` enabled, `TaskInstance.error()` committed 
internally on the shared, request-scoped session the Execution API's 
`ti_update_state` route uses for its own state update — so the fail-fast 
cascade's sibling-task FAILED updates landed in the database before that route 
executed or committed its own UPDATE for the task that actually triggered the 
cascade. A failure anywhere in between rolled back the route's own change but 
couldn't undo the sibling's already-committed state, leaving the database 
durably inconsistent: siblings marked FAILED while the triggering task's own 
FAILED transition was silently lost.
   
   This removes that internal commit, plus three other call sites verified 
individually to have no control flow depending on their own commit 
(`DagWarning.purge_inactive_dag_warnings`, and `utils/db.py`'s 
`merge_conn`/`add_default_pool_if_not_exists`). Several structurally similar 
commits were also examined and intentionally left in place — 
`Job.kill()`/`Job.prepare_for_execution()`, `TaskInstance.save_to_db()`, the 
team CLI commands, and the scheduler's stuck-in-queued handler — each for a 
specific reason noted at the call site, since a blanket sweep here is exactly 
what sank two prior attempts at this issue (#21283, #12822).
   
   This is a scoped fix of the broader cleanup tracked by #12818, not a 
complete resolution — several other candidates were found during the audit but 
held back for a follow-up rather than widening this PR's blast radius.
   
   related: #12818
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Sonnet 5)
   
   Generated-by: Claude Code (Sonnet 5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


-- 
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]

Reply via email to