Uh oh!
There was an error while loading. Please reload this page.
Fixed Task group names duplication in Task's task_id for MappedOperator - #53532
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)
|
evgenii-prusov
commented
Jul 19, 2025
@Lee-W , please, have a look |
Uh oh!
There was an error while loading. Please reload this page.
c2e3f28 to
d9b3ea3CompareUh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Wei Lee <weilee.rx@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
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 |
…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)
…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)
…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)
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.