Skip to content

Save resources affected by data patches and dependency updates on a re…#355

Merged
rbs-jacob merged 1 commit into
redballoonsecurity:masterfrom
EdwardLarson:bugfix/save_resources_affected_by_save
Aug 7, 2023
Merged

Save resources affected by data patches and dependency updates on a re…#355
rbs-jacob merged 1 commit into
redballoonsecurity:masterfrom
EdwardLarson:bugfix/save_resources_affected_by_save

Conversation

@EdwardLarson
Copy link
Copy Markdown
Contributor

@EdwardLarson EdwardLarson commented Aug 1, 2023

…source being saved

One sentence summary of this PR (This should go in the CHANGELOG!)
Save resources affected by data patches and dependency updates on a resource being saved

Link to Related Issue(s)
Calling resource.save() will apply data patches, which for mapped resources will also modify one or more ancestors. Without these changes, those resources would be marked as "dirty" after the original save call. This has the confusing result of making local state overall "dirtier" after a save call, rather than less.

Please describe the changes in your request.
With these changes, if save call on one resource modifies other resources, those resources' models will also be pushed and not dirty.

Anyone you think should look at this, specifically?
@dannyp303

@EdwardLarson EdwardLarson requested a review from whyitfor August 2, 2023 17:01
@rbs-jacob rbs-jacob requested review from rbs-jacob and removed request for whyitfor August 3, 2023 19:12
Copy link
Copy Markdown
Member

@rbs-jacob rbs-jacob left a comment

Choose a reason for hiding this comment

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

The changes here make sense to me individually, but I don't totally understand how they come together to solve the original bug. Still, as far as I can tell, this seems fine.

@rbs-jacob rbs-jacob merged commit 3fc09f8 into redballoonsecurity:master Aug 7, 2023
@EdwardLarson EdwardLarson mentioned this pull request Aug 10, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants