Fixed Task group names duplication in Task's task_id for MappedOperator#53532
Merged
Lee-W merged 4 commits intoapache:mainfrom Jul 22, 2025
Merged
Fixed Task group names duplication in Task's task_id for MappedOperator#53532Lee-W merged 4 commits intoapache:mainfrom
Lee-W merged 4 commits intoapache:mainfrom
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
Contributor
Author
|
@Lee-W , please, have a look |
Lee-W
reviewed
Jul 19, 2025
c2e3f28 to
d9b3ea3
Compare
potiuk
approved these changes
Jul 20, 2025
Lee-W
reviewed
Jul 20, 2025
Co-authored-by: Wei Lee <weilee.rx@gmail.com>
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
Backport failed to create: v3-0-test. View the failure log Run details
You can attempt to backport this manually by running: cherry_picker 6b618ef v3-0-testThis should apply the commit to the v3-0-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 --continue |
amoghrajesh
pushed a commit
to astronomer/airflow
that referenced
this pull request
Aug 11, 2025
…or (apache#53532) Co-authored-by: Wei Lee <weilee.rx@gmail.com> Co-authored-by: Evgenii Prusov <evgenii.prusov@daiichisankyo.com> (cherry picked from commit 6b618ef)
amoghrajesh
pushed a commit
to astronomer/airflow
that referenced
this pull request
Aug 11, 2025
…or (apache#53532) Co-authored-by: Wei Lee <weilee.rx@gmail.com> Co-authored-by: Evgenii Prusov <evgenii.prusov@daiichisankyo.com> (cherry picked from commit 6b618ef)
amoghrajesh
pushed a commit
to astronomer/airflow
that referenced
this pull request
Aug 11, 2025
…or (apache#53532) Co-authored-by: Wei Lee <weilee.rx@gmail.com> Co-authored-by: Evgenii Prusov <evgenii.prusov@daiichisankyo.com> (cherry picked from commit 6b618ef)
This was referenced Aug 13, 2025
meldiner
pushed a commit
to faros-ai/airflow
that referenced
this pull request
Feb 6, 2026
…or (apache#53532) Co-authored-by: Wei Lee <weilee.rx@gmail.com> Co-authored-by: Evgenii Prusov <evgenii.prusov@daiichisankyo.com> (cherry picked from commit 6b618ef)
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.
Summary
Fixes task_id duplication when unmapping a MappedOperator within a TaskGroup. Previously, task IDs would get double-prefixed (e.g.,
tg1.tg1.mapped_taskinstead oftg1.mapped_task).Problem
When
MappedOperator.unmap()is called, it passes the already-prefixed task_id toBaseOperator.__init__, which applies the prefix again viatask_group.child_id().closes: #52334
Solution
Check if task_id already contains the task group prefix before passing to BaseOperator, preventing double prefixing.
Testing
Added test
test_mapped_operator_in_task_group_no_duplicate_prefixto verify the fix. All existing tests pass.