Repository navigation
Give every mapped expansion a region and store its index as region_index - #74346
Merged
Merged
Conversation
ashb
added this pull request to stack #74339
October 6, 2026 15:06
kaxil
reviewed
Oct 6, 2026
ashb
force-pushed
the
task-loops-stack-5
branch
from
October 7, 2026 13:57
8c43b91 to
91d8983
Compare
ashb
removed this pull request from stack #74339
October 7, 2026 15:20
ashb
force-pushed
the
task-loops-stack-5
branch
from
October 7, 2026 15:22
91d8983 to
d3f9ca7
Compare
ashb
added this pull request to stack #74410
October 7, 2026 15:22
ashb
force-pushed
the
task-loops-stack-5
branch
from
October 7, 2026 20:57
d3f9ca7 to
5201df1
Compare
ashb
force-pushed
the
task-loops-stack-5
branch
2 times, most recently
from
October 8, 2026 13:53
85bbef2 to
63cb154
Compare
ashb
marked this pull request as ready for review
October 8, 2026 13:58
ashb
requested review from
XD-DENG,
bolkedebruin,
bugraoz93,
dheerajturaga,
henry3260 and
rawwar
as code owners
October 8, 2026 13:58
ashb
force-pushed
the
task-loops-stack-5
branch
from
October 8, 2026 16:06
63cb154 to
6c6f184
Compare
kaxil
approved these changes
Oct 8, 2026
ashb
force-pushed
the
task-loops-stack-5
branch
2 times, most recently
from
October 9, 2026 10:32
5149013 to
93f88c1
Compare
ashb
force-pushed
the
task-loops-stack-5
branch
from
October 9, 2026 14:03
93f88c1 to
31f60f7
Compare
ashb
force-pushed
the
task-loops-stack-5
branch
2 times, most recently
from
October 9, 2026 20:34
ba7075e to
38853b7
Compare
ashb
force-pushed
the
task-loops-stack-5
branch
2 times, most recently
from
October 9, 2026 22:18
685c2a1 to
9f0a1c6
Compare
ashb
force-pushed
the
task-loops-stack-5
branch
from
October 10, 2026 07:05
9f0a1c6 to
930f347
Compare
Mapped tasks were the one kind of dynamic work still outside the region model: their instances sat in the sentinel region and were told apart only by map_index. A loop has to be able to contain an expansion, one per pass, and that only works if the expansion owns a region of its own. The coordinate column is renamed in place so large deployments pay for metadata changes, not a table rewrite. No table is rebuilt because SQLite's rebuild would cascade-delete the rows that reference task_instance.id. legacy_task_data_owner, xcom_v1 and rtif_v1 keep map_index because they record the coordinates their rows had before regions existed. The ORM keeps map_index as an alias: Jinja log-filename templates and provider code still read ti.map_index from ORM rows, and removing it needs its own audit. Mapping keeps its existing behaviour. A task's region is born with its placeholder, re-expansion grows or shrinks it in place, and a map never forks. Promoting the placeholder to index 0 stays in place too. Attempts retired before the promotion stay at index -1: they own their XCom, rendered fields and log files by UUID, and moving them could collide with retired attempts already at index 0. A pre-region placeholder never ran, so it has no history to keep; it moves into a freshly minted region and is promoted like any other, instead of being retired as a phantom failed try. Pre-region expansions stay in the sentinel region and keep revising in place, so the upgrade does not rewrite existing rows. Callers that address a task instance by public coordinates now find a task's own region as well as the sentinel. The DagRun wait endpoint reads current producers only and rejects loop results, because which pass's result to return would be ambiguous.
ashb
force-pushed
the
task-loops-stack-5
branch
from
October 10, 2026 16:18
30857fb to
256ed4b
Compare
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.
Was generative AI tooling used to co-author this PR?
{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.