Ensure that dag.partial_subset doesn't mutate task group properties#30129
Merged
Conversation
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.
Member
Author
|
Marked it for 2.5.3 in case there is one before 2.6 |
kaxil
approved these changes
Mar 15, 2023
This comment was marked as resolved.
This comment was marked as resolved.
bbovenzi
requested changes
Mar 15, 2023
Member
Author
|
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 |
Member
Author
|
Slightly more complex now, but it errs on the side of not breaking things in future (while still be quick now) |
ashb
commented
Mar 15, 2023
bbovenzi
approved these changes
Mar 15, 2023
bbovenzi
left a comment
Contributor
There was a problem hiding this comment.
Local testing works for me now. Including very large dags.
jedcunningham
approved these changes
Mar 15, 2023
Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
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)
28 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
childrenandparent_group.This also made me notice that we were not correctly setting
parent_groupafter partial_subset anymore -- it clearly hasn't mattered, but we were setting a now-unused_parent_groupattribute.Fixes #26059