Repository navigation
Fix short-circuit inside a mapped task group not skipping downstream - #73959
Merged
kaxil merged 2 commits intoOct 1, 2026
Merged
Conversation
…tasks NotPreviouslySkippedDep looked up the SkipMixin decision at map_index -1 unless the parent was a MappedOperator. A task inside a mapped task group is expanded per map index and writes its skip XCom per map index, so the decision was never found and the downstream task ran. Use get_needs_expansion() so both cases read the child's map index.
1 of 2 tasks
kaxil
requested review from
eladkal,
gopidesupavan,
shahar1 and
vatsrahul1001
September 30, 2026 16:57
Lee-W
approved these changes
Oct 1, 2026
vatsrahul1001
approved these changes
Oct 1, 2026
This was referenced Oct 1, 2026
1 of 2 tasks
1 task done
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.
A short-circuit task inside a mapped task group stopped skipping the task after it in 3.2.0.
Each map index of a task in a mapped task group runs as its own task instance, so
SkipMixinwrites the skip decision to XCom under that map index. #62287 changedNotPreviouslySkippedDepto read that XCom atmap_index=-1unless the parent is aMappedOperator, to fix an unmappedLatestOnlyOperatorupstream of a mapped task. A task inside a mapped task group is a plain operator whoseis_mappedis False, so the dep read-1, found no decision, and let the downstream task run.The dep now checks
get_needs_expansion(), which is true for a mapped operator and for any task inside a mapped task group: the tasks that write XCom per map index. An unmapped parent still reads-1, and the regression test from #62287 passes unchanged.A gate that returns False for odd map indexes,
gate(v) >> printstr(v)inside a task group expanded over[0, 1, 2, 3], run by the scheduler before and after the change:related: #55225
{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.