-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Fixed Task group names duplication in Task's task_id for MappedOperator #53532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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)
|
|
@Lee-W , please, have a look |
c2e3f28 to
d9b3ea3
Compare
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 |
…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.