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

   Pin the behavior of task_instance_mutation_hook during mapped-task expansion 
while the scheduler's prohibit_commit guard is active — the exact path that 
crashes the scheduler when a hook opens a nested committing session (e.g. a 
no-arg get_dagrun()).
   
   Adds three tests to TestDagRun's neighborhood in test_dagrun.py:
   - a naive DB-touching hook raises UNEXPECTED COMMIT under the guard,
   - a session-reusing hook survives the guard and routes queue from 
DagRun.conf on every expanded mapped TI,
   - a deterministic hook called repeatedly per TI yields a stable result.
   
   These close gaps where existing tests only asserted the hook was invoked, 
never that its mutation survived mapped expansion or that the guard was active 
on that path.
   
   
   ##### Was generative AI tooling used to co-author this PR?
   
   <!--
   If generative AI tooling has been used in the process of authoring this PR, 
please
   change below checkbox to `[X]` followed by the name of the tool, uncomment 
the "Generated-by".
   -->
   
   - [ ] Yes (please specify the tool below)
   ClaudeCode Opus 4.8
   
   <!--
   Generated-by: [Tool Name] 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