Repository navigation
Number task loop iterations from one instead of zero - #74773
Merged
bbovenzi merged 1 commit intoOct 20, 2026
Merged
Conversation
bbovenzi
requested review from
XD-DENG,
amoghrajesh,
ashb,
bugraoz93,
choo121600,
ephraimbuddy,
guan404ming,
henry3260,
jason810496,
kaxil,
pierrejeambrun,
rawwar,
ryanahamilton,
shubhamraj-git and
vatsrahul1001
as code owners
October 14, 2026 23:20
bbovenzi
force-pushed
the
dev/loop-task-iteration-start-one-370470
branch
2 times, most recently
from
October 16, 2026 14:45
c56e618 to
59eae68
Compare
ashb
reviewed
Oct 19, 2026
ashb
reviewed
Oct 19, 2026
bbovenzi
force-pushed
the
dev/loop-task-iteration-start-one-370470
branch
from
October 19, 2026 21:55
888cf42 to
c79cd1f
Compare
kaxil
reviewed
Oct 19, 2026
kaxil
approved these changes
Oct 19, 2026
bbovenzi
force-pushed
the
dev/loop-task-iteration-start-one-370470
branch
from
October 20, 2026 03:50
c79cd1f to
3258cc3
Compare
1 task done
A loop iteration is a number people read: it shows up in the loop filter, on the Gantt tooltip, in the task instance list and in the `loop.index` a Dag author branches on. Starting it at zero meant each of those readers had to translate between the number Airflow stored and the number a person would say, and that translation was easy to apply in one place and forget in another. Numbering from one in storage removes the translation instead of hiding it behind a display-time adjustment, so the stored index, the API field and the UI agree without anyone adding to it. Mapped expansion indexes share the column and stay zero-based: a map index is a position, not a count, so code reading the column has to know whether the region executes a loop or an expansion. Task loops have not shipped in a release, so no stored run and no client depends on the old numbering, and the execution API version that introduces the loop context is still unreleased. Co-Authored-By: Claude <noreply@anthropic.com>
bbovenzi
force-pushed
the
dev/loop-task-iteration-start-one-370470
branch
from
October 20, 2026 14:00
3258cc3 to
e9da72d
Compare
Contributor
Backport failed to create: v3-4-test. View the failure log Run detailsNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
You can attempt to backport this manually by running: cherry_picker a8c55b7 v3-4-testThis should apply the commit to the v3-4-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continueIf you don't have cherry-picker installed, see the installation guide. |
1 task done
1 task done
ashb
pushed a commit
that referenced
this pull request
Oct 21, 2026
) (#75260) A loop iteration is a number people read: it shows up in the loop filter, on the Gantt tooltip, in the task instance list and in the `loop.index` a Dag author branches on. Starting it at zero meant each of those readers had to translate between the number Airflow stored and the number a person would say, and that translation was easy to apply in one place and forget in another. Numbering from one in storage removes the translation instead of hiding it behind a display-time adjustment, so the stored index, the API field and the UI agree without anyone adding to it. Mapped expansion indexes share the column and stay zero-based: a map index is a position, not a count, so code reading the column has to know whether the region executes a loop or an expansion. Task loops have not shipped in a release, so no stored run and no client depends on the old numbering, and the execution API version that introduces the loop context is still unreleased. (cherry picked form commit a8c55b7) Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task Loop Iterations were starting at 0 which was confusing in the UI. Instead of remembering a UI-only "+1" change that we could easily forget to add. This PR changes it so that all region_indexes that are for loop iterations start at 1.
Was generative AI tooling used to co-author this PR?
Claude Opus 5
Generated-by: Claude Opus 5 following the guidelines
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.