Skip to content

Conversation

@ashb
Copy link
Member

@ashb ashb commented Mar 15, 2023

We had a few properties that we failed to deepcopy that we should have. To fix that in such a way that we don't miss things in the future I've converted it to use deepcopy everything by default and exclude children and parent_group.

This also made me notice that we were not correctly setting parent_group after partial_subset anymore -- it clearly hasn't mattered, but we were setting a now-unused _parent_group attribute.

Fixes #26059

We had a few properties that we failed to copy that we should have. To
fix that in such a way that we don't miss things in the future I've
converted it to use deepcopy everything by default and exclude
`children` and `parent_group`.

This also made me notice that we were not correctly setting
`parent_group` after partial_subset anymore -- it clearly hasn't mattered, but
we were setting a now-unused `_parent_group` attribute.
@ashb ashb requested review from XD-DENG and kaxil as code owners March 15, 2023 16:35
@ashb ashb added this to the Airflow 2.5.3 milestone Mar 15, 2023
@ashb
Copy link
Member Author

ashb commented Mar 15, 2023

Marked it for 2.5.3 in case there is one before 2.6

@ashb

This comment was marked as resolved.

@ashb
Copy link
Member Author

ashb commented Mar 15, 2023

Okay yeah, I've totally misunderstood how deepcopy memo works on classes (It only works on instances, not on individual fields of the instance.) Rethinking

@ashb
Copy link
Member Author

ashb commented Mar 15, 2023

Slightly more complex now, but it errs on the side of not breaking things in future (while still be quick now)

@ashb ashb requested review from bbovenzi and kaxil March 15, 2023 18:23
Copy link
Contributor

@bbovenzi bbovenzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local testing works for me now. Including very large dags.

Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
@ashb ashb merged commit 76a884c into apache:main Mar 15, 2023
@ashb ashb deleted the partial-subset-taskgroup-deepcopy branch March 15, 2023 20:05
@pierrejeambrun pierrejeambrun added the type:bug-fix Changelog: Bug Fixes label Mar 22, 2023
pierrejeambrun pushed a commit that referenced this pull request Mar 23, 2023
…#30129)

We had a few properties that we failed to copy that we should have. To
fix that in such a way that we don't miss things in the future I've
converted it to use deepcopy everything by default and exclude
`children` and `parent_group`.

This also made me notice that we were not correctly setting
`parent_group` after partial_subset anymore -- it clearly hasn't mattered, but
we were setting a now-unused `_parent_group` attribute.

(cherry picked from commit 76a884c)
pierrejeambrun pushed a commit that referenced this pull request Mar 24, 2023
…#30129)

We had a few properties that we failed to copy that we should have. To
fix that in such a way that we don't miss things in the future I've
converted it to use deepcopy everything by default and exclude
`children` and `parent_group`.

This also made me notice that we were not correctly setting
`parent_group` after partial_subset anymore -- it clearly hasn't mattered, but
we were setting a now-unused `_parent_group` attribute.

(cherry picked from commit 76a884c)
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

Development

Successfully merging this pull request may close these issues.

[Graph view] After clearing the task (and its downstream tasks) in a task group the task group becomes disconnected from the dag

5 participants