Ruby 3 & Rails 7 support - #57
Closed
RDIL wants to merge 21 commits into
Closed
Conversation
This will make the process a lot easier
So that you can actually get stuff done!!
In a test environment, or when creating/seeding the database, there are no tables defined in ActiveRecord. This causes an edge case where, if *any* `method_missing` is called (and it gets to MSL), an error will be thrown. This is because accessing `columns_hash` or `column_names` will cause a query to be made that will fail (as it expects the table to already be present in the database). For getting caught up on the memes, see the following: - Genius/Rap-Genius#15200 - Genius/heroku-buildpack-ruby#14 Feel free to backport this to Rails 2 - seems pointless since it's On The Way Out (TM) (as it has been for the last decade, but who's counting?!)
idk about the schema change but i'ma roll with it
idk about the schema change but i'ma roll with it
…chlogic into reece/new-rails
We're skipping rails 6 because I do not care enough
Same memes, different day. It's not a real model, so it shouldn't crash on column type discovery, since it has no columns.
Per-rails-version migrations were a bad idea, but per-version schemas was not. As such, we can have our cake and eat it too.
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.
Blocked on #55, #56
Some things I had to do:
Minor restructuring
Previously, we symlinked
dbfor each test app to a common folder. On new Rails versions, it complains if the migrations don't have an ActiveRecord migration number, and also the schema keeps getting clobbered, depending on which suite you ran last. To make things better, we now have per-rails-version schemas, but still have symlinked migrations.Review notes
The only file marked as generated that really needs a review is this one: https://github.com/Genius/modern_searchlogic/pull/57/files#diff-aac10e1afccb13652da4e602b9ce73d61f4fad608c156f1258df219a037896bf - it patches new Rake to work with Rails 3. The method is not relevant so we can just stub it.
Rake setup
Tasks:
install_appraisals- Installs all appraisals for local devrspecX(where X is 3/4/5/7), to run tests against that rails version