Skip to content
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

Unify mapped task group lookup logic #34637

Merged
merged 1 commit into from Sep 27, 2023

Conversation

uranusjr
Copy link
Member

Just some minor refactoring.

The lookup logic in operators is identical to the one on task groups (in a function of the same name), so let's reuse the logic instead of having to maintain two loops with only slightly different code.

I thought about getting rid of this function on AbstractOperator altogether, but the self.task_group is None case is annoying enough I feel it's still better to keep the extra abstraction layer.

The lookup logic in operators is identical to the one on task groups (in
a function of the same name), so let's reuse the logic instead of having
to maintain two loops with only slightly different code.

I thought about getting rid of this function on AbstractOperator
altogether, but the 'self.task_group is None' case is annoying enough I
feel it's still better to keep the extra abstraction layer.
@uranusjr uranusjr force-pushed the refactor-iter-mapped-task-group branch from f80733b to 8fbf9c3 Compare September 27, 2023 00:54
@uranusjr uranusjr merged commit e5325cd into apache:main Sep 27, 2023
43 checks passed
@uranusjr uranusjr deleted the refactor-iter-mapped-task-group branch September 27, 2023 19:37
@ephraimbuddy ephraimbuddy added this to the Airflow 2.8.0 milestone Oct 3, 2023
@ephraimbuddy ephraimbuddy added the type:improvement Changelog: Improvements label Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:improvement Changelog: Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants