Fix SystemStackError when paranoid models have a circular dependent: :destroy#446
Open
andyklimczak wants to merge 1 commit intorubysherpas:corefrom
Open
Fix SystemStackError when paranoid models have a circular dependent: :destroy#446andyklimczak wants to merge 1 commit intorubysherpas:corefrom
SystemStackError when paranoid models have a circular dependent: :destroy#446andyklimczak wants to merge 1 commit intorubysherpas:corefrom
Conversation
Author
|
Based on the travis results, a different approach will be needed I think. But the failing tests show that the test case does reproduce the error |
|
Are there plans to fix it soon? |
Author
|
Yeah, I'll take another look. Shoutouts to everyone who 👍 and subscribed to this PR. If anyone has an insight, tips or ideas, please feel free to post here. Any help is appreciated |
andyklimczak
commented
Jan 8, 2019
test/paranoia_test.rb
Outdated
| belongs_to_dependent_destroy.destroy | ||
|
|
||
| assert_equal false, has_one_dependent_destroy.reload.deleted_at.nil? | ||
| assert_equal false, belongs_to_dependent_destroy.reload.deleted_at.nil? |
2e3b3ad to
ffcac89
Compare
Author
|
note for later: https://docs.travis-ci.com/user/languages/ruby/#bundler-20 |
3a4b295 to
4704336
Compare
Author
|
Ran into some build errors for this project with the bundler 2.0 release, that's my blocker atm. Working through it |
07ffb12 to
760f3d9
Compare
a46430e to
9cd1593
Compare
andyklimczak
commented
Sep 13, 2019
| before_install: gem update --system | ||
| before_install: | ||
| - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true | ||
| - gem install bundler -v '< 2' |
Author
|
Caught up with travisci issues. Ready for review! 🎉 |
…t: :destroy` - Previously, paranoid models with a circular `dependent: :destroy` would recursively try to delete eachother - Add a variable to check if the destroy callback has already been called for that model - Similar fix to rails/rails#18548
6127fb5 to
28a8d64
Compare
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.
dependent: :destroywould recursively try to delete eachother, causing astack level too deeperror