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

   The "Failures, skips, and retries" section of the task loops docs says the 
last iteration is `loop.index == loop.max_iterations - 1`. `loop.index` starts 
at 1 (the same page says to check `loop.index == 1` for the first iteration), 
so the last iteration is `loop.index == loop.max_iterations`.
   
   This matches the gate's own check in 
`task-sdk/src/airflow/sdk/execution_time/loop.py`, `loop.index >= 
loop.max_iterations`. On 3.4.0, a loop with `max_iterations=3` and an `until` 
that never stops logs `index=3 max_iterations=3` from its last gate, and that 
gate fails with `Loop condition remained false at max_iterations=3`.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [x] Yes — Claude Code (Claude Opus 5.5)
   
   Generated-by: Claude Code (Claude 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