Repository navigation
Resolve live producers by region and read their XCom by attempt - #74344
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-3
branch
from
October 7, 2026 13:57
c65dc01 to
2cdf742
Compare
ashb
removed this pull request from stack #74339
October 7, 2026 15:20
ashb
force-pushed
the
task-loops-stack-3
branch
from
October 7, 2026 15:22
2cdf742 to
1624bc8
Compare
ashb
added this pull request to stack #74410
October 7, 2026 15:22
ashb
force-pushed
the
task-loops-stack-3
branch
from
October 7, 2026 20:57
1624bc8 to
337cba0
Compare
ashb
force-pushed
the
task-loops-stack-3
branch
from
October 8, 2026 13:48
337cba0 to
356e35f
Compare
ashb
force-pushed
the
task-loops-stack-3
branch
from
October 8, 2026 13:53
356e35f to
8d326be
Compare
ashb
marked this pull request as ready for review
October 8, 2026 13:55
ashb
force-pushed
the
task-loops-stack-3
branch
from
October 8, 2026 16:06
8d326be to
1b3d613
Compare
kaxil
approved these changes
Oct 8, 2026
ashb
force-pushed
the
task-loops-stack-3
branch
2 times, most recently
from
October 9, 2026 10:32
6bf6974 to
a67defe
Compare
ashb
force-pushed
the
task-loops-stack-3
branch
from
October 9, 2026 14:03
a67defe to
e650913
Compare
ashb
force-pushed
the
task-loops-stack-3
branch
from
October 9, 2026 16:28
e650913 to
27ce78f
Compare
ashb
force-pushed
the
task-loops-stack-3
branch
from
October 9, 2026 20:34
27ce78f to
7ab99d4
Compare
ashb
force-pushed
the
task-loops-stack-3
branch
2 times, most recently
from
October 9, 2026 22:18
832e405 to
b419bda
Compare
Once a loop body or a mapped region can hold several live task instances with the same task_id and map_index, a consumer can no longer find its producer from (dag_id, run_id, task_id, map_index) alone, so the lookup has to know where the caller sits: in the same iteration, in the previous one (what a loop body means by "the last result"), outside the loop, or in an explicitly named region. When more than one live candidate still fits we have no sensible option to raise an error. Only live (non-archived or superceded) try are candidates, and their data is read by UUID. An archived try keeps its XCom under its own UUID, so reading by the resolved try is exact and cannot revive data from work a clear replaced. Callers that predate regions must see what they saw before, so the default read scope stays the sentinel region and regional rows appear only when a caller asks for them. Lookups of earlier runs refuse a non-sentinel region because a region belongs to a single Dag run, so the producer has to be resolved again for each run. The scheduler detected changes to upstream state and tracked map-length revisions by TaskInstanceKey, which cannot tell two regions apart. One region's expansion would have marked another's as changed, so both now key on the attempt and on (task, region).
ashb
force-pushed
the
task-loops-stack-3
branch
from
October 10, 2026 07:05
b419bda to
2dda9b4
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.
Once a loop body or a mapped region can hold several live task instances with
the same task_id and map_index, a consumer can no longer find its producer from
(dag_id, run_id, task_id, map_index) alone, so the lookup has to know where the
caller sits: in the same iteration, in the previous one (what a loop body means
by "the last result"), outside the loop, or in an explicitly named region. When
more than one live candidate still fits we have no sensible option to raise
an error.
Only live (non-archived or superceded) try are candidates, and their data is
read by UUID. An archived try keeps its XCom under its own UUID, so reading by
the resolved try is exact and cannot revive data from work a clear replaced.
Callers that predate regions must see what they saw before, so the default read
scope stays the sentinel region and regional rows appear only when a caller asks
for them. Lookups of earlier runs refuse a non-sentinel region because a region
belongs to a single Dag run, so the producer has to be resolved again for each
run.
The scheduler detected changes to upstream state and tracked map-length
revisions by TaskInstanceKey, which cannot tell two regions apart. One region's
expansion would have marked another's as changed, so both now key on the attempt
and on (task, region).
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.