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

   On Airflow 3.4 a task in a task loop iteration has a public `map_index` of 
-1, so `KubernetesPodOperator` gave the pods of every iteration the same 
labels. Reattaching could then match another iteration's pod, and nothing on a 
pod named the task instance that created it.
   
   On Airflow 3.4+ the operator now adds:
   
   - `region_id` and `region_index` when the task instance runs in a dynamic 
region. They are also part of the `find_pod` selector, so reattaching stays 
within one iteration. A task outside any region keeps its current labels and 
selector.
   - `ti_id`, the id of the exact try. It is left out of the selector, since 
reattaching matches across tries.
   
   Older Airflow versions get no new labels.
   
   Verified in Breeze: `test_pod.py` passes (276 tests). Without the change in 
`pod.py`, the two new region tests and the label assertions updated for `ti_id` 
fail.
   
   closes: #75904
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 5.5)
   
   Generated-by: Claude Code (Opus 5.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