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

Revert autosave breaking change until fix is implemented #42104

Merged

Conversation

Tonkpils
Copy link
Contributor

@Tonkpils Tonkpils commented Apr 29, 2021

Summary

#41860 introduced two changes in behavior that need to be addressed prior to bringing it back.

Endless loop on update_attribute in callback which was promptly addressed by #42002
Update callbacks called on create if update_attribute is called inside a before_* callback which @p8 is still looking into.

In the mean time, I put together this revert PR to unblock the GitHub rails upgrade and ensure there's no other issues with main.

/cc @eileencodes

@Tonkpils Tonkpils changed the title Revert autosave breaking change until fix Revert autosave breaking change until fix is implemented Apr 29, 2021
The change introduced in rails#41860
triggered some endless loops which is now reverted by e424c41512e8779663c1bcd222b31c272af811ca

This test is just to ensure the behavior is documented once we address
both the endless loop and behavior change around update callbacks
mentioned rails#42002 (comment)
As mentioned in rails#42002 (comment),
rails#41860 introduced a behavior change
in callbacks whenever `update_attribute` is called within a `before_*`
callback triggered by a `create` which caused `after_update` callbacks
to be triggered by the create.

This ensures once the revert is re-reverted we'll have properly
addressed the fix
@Tonkpils Tonkpils force-pushed the revert-autosave-breaking-change-until-fix branch from bb1c687 to 52c2fa9 Compare April 29, 2021 15:01
@p8
Copy link
Member

p8 commented Apr 29, 2021

Sounds good to me. I’ll add tests next week to prevent the regressions.

@eileencodes eileencodes merged commit cdaf7c4 into rails:main Apr 29, 2021
@Tonkpils Tonkpils deleted the revert-autosave-breaking-change-until-fix branch April 29, 2021 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants