Skip to content

Conversation

@ephraimbuddy
Copy link
Contributor

@ephraimbuddy ephraimbuddy commented Aug 25, 2023

When a MappedTaskGroup has upstream dependencies, the tasks in the group don't wait for the upstream tasks
before they start running, this causes the tasks to fail.
From my investigation, the tasks inside the MappedTaskGroup don't have upstream tasks while the
MappedTaskGroup has the upstream tasks properly set. Due to this, the task's dependencies are met even though the Group has
upstreams that haven't finished.
The Fix was to set upstreams after creating the task group with the factory
Closes: #33446

@ephraimbuddy ephraimbuddy requested a review from uranusjr August 25, 2023 14:35
@ephraimbuddy ephraimbuddy force-pushed the fix-mapped-tg-upstream branch from d87db9c to 4ac2e41 Compare August 29, 2023 14:10
@ephraimbuddy ephraimbuddy marked this pull request as ready for review August 29, 2023 14:11
@ephraimbuddy ephraimbuddy force-pushed the fix-mapped-tg-upstream branch from 40d0c91 to 45851e6 Compare August 29, 2023 14:52
When a MappedTaskGroup has upstream dependencies, the tasks in the group don't wait for the upstream tasks
before they start running, this causes the tasks to fail.
From my investigation, the tasks inside the MappedTaskGroup don't have upstream tasks while the
MappedTaskGroup has the upstream tasks properly set. Due to this, the task's dependencies are met even though the Group has
upstreams that haven't finished.
The Fix was to set upstreams after creating the task group with the factory
Closes: apache#33446
@ephraimbuddy ephraimbuddy force-pushed the fix-mapped-tg-upstream branch from 45851e6 to 7a5b6ee Compare August 29, 2023 14:53
@ephraimbuddy ephraimbuddy added this to the Airflow 2.7.1 milestone Aug 29, 2023
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Aug 29, 2023
@ephraimbuddy ephraimbuddy merged commit fe27031 into apache:main Aug 29, 2023
@ephraimbuddy ephraimbuddy deleted the fix-mapped-tg-upstream branch August 29, 2023 16:48
ephraimbuddy added a commit that referenced this pull request Sep 1, 2023
* Fix MappedTaskGroup tasks not respecting upstream dependency

When a MappedTaskGroup has upstream dependencies, the tasks in the group don't wait for the upstream tasks
before they start running, this causes the tasks to fail.
From my investigation, the tasks inside the MappedTaskGroup don't have upstream tasks while the
MappedTaskGroup has the upstream tasks properly set. Due to this, the task's dependencies are met even though the Group has
upstreams that haven't finished.
The Fix was to set upstreams after creating the task group with the factory
Closes: #33446

* set the relationship in __exit__

(cherry picked from commit fe27031)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug-fix Changelog: Bug Fixes

Projects

None yet

2 participants