seth/rails-7.2#60437
Conversation
…es selenium-webdriver to 4.10.0
… anyway) which was spewing warnings to console
… - remove when bundler version is >=2.0'
…undle version (bundle does this automatically to match Gemfile.lock bundled with on bundle install)
…m to 3.5.17 Gem is an interesting case, the default gem version with ruby with 3.3.4 is 3.5.11, but a previous update of default.rb by Elijah had trouble unless a version of rubygem was specified that was NOT the system version, see: bf41ebf
…bled = no verification) cdo-ruby/ ruby_spec.rb: verify versions
…ws about Ruby 3.3.4.
…r chef will ignore if files already exist from a previous version
… "000000" were turning into the int 0 which confuses the poor badger
… but will no longer be part of the default gems since Ruby 3.4.0"
…-kitchen 3.4.0. See: #60329 (comment)
Fix is to explicitly pass Fixed by: d33d7e9 |
migrating off composite_primary_key to rails built-inFixed by: 7a8d698 |
Closely related issue: freerange/mocha#614 This could be fixed by upgrading mocha, but its a major version jump and seems like it could open a can of worms. Instead I've opted to work around this by pulling in the old MiniTest constants using Upgrading mocha+minitest could be revisited in a follow-up PR, probably a good idea anyway. Fixed by: 3e7344a |
Another require that should be loaded by zeitwerk automatically. Fixed by: 234a3b3 |
Remove lock_thread.rb, a "feature backport from Rails 5.1"This was fixed in rails here: rails/rails#28083 We backported the feature, but the backport no longer works and would appear to be redundant in modern rails. If all the tests break in crazy non-deterministic ways, this might be a good comment to revisit ;-) Removed by: 6dbd485 Fix transactional_test_case.rbRails 7.2 removes Fixed by: de3a5f8 |
a596075 to
6dbd485
Compare
|
Tests now start to run, but ALL fail with errors exactly like: Repros with: Well this was a crazy one and took almost an hour to find. This bizarre error stems from not having a Fixed by: 5243242 |
|
A bunch of LevelsHelperTest based tests failing with this backtrace: Repros locally with: In Rails 6.0.1 connected_to has this signature: In Rails 7.2 connected_to has this signature: Fix is to modify connected_to in Fixed by: 0faac07 |
…lock_thread= (removed in Rails 7.2) See: rails/rails#50999
WARN: Multiple ActiveRecord connections are in useStill getting lots of warnings: Repros with: in transactional_test_case.rb we see: Rails 7.2In-situIf we inspect all_connections and pools in-situ with binding.irb: In other words, we have multiple connections because rails consoleWhat's interesting is that if we load Rails 6.1.7.7in-siturails consoleFixWe hardcode our read/write replicas (following the pattern from a medium article) in active_record_roles.rb and embedded in application.rb like so: Even when these are both the same connection pool, Rails 7.2 lists the connection pool twice. As a result, we trigger the warning. The fix is to de-duplicate our Fixed by: 619a8fc |
alias_attribute doesn't work for associations anymoreIt will only work for attributes, this was deprecated in Rails 7.1, but actually dropped in Rails 7.2. We aren't the only ones feeling some pain from this, see stackoverflow: aliasing associations in rails 7.1 for example. Shopify opened a PR that added an Workarounds
FixingA quick search suggests we use 5 of these places its pretty clearly an actual attribute being aliased, and I think nothing needs changing: For this one, I dropped :programming_environment_categories, which was afaict unused in favor of its alias categories: After change, related tests still pass: Fixed by: 4c94df7 As far as I can tell RegionalPartnerCohort is actually an unused vestigial table. I'm following up with acquisition products to confirm this. Nevertheless, I ported it, following the "duplicate the association" pattern, in case there's some stealth use of it I can't confirm this is the safest pattern After change related tests pass: Fixed by: 3486912 Update: @dmcavoy confirms that this is probably a vestigial table that we can (should!) drop Here I discovered that two of the aliases were real attributes. I wasn't sure what qualified, with grades having a serializer, but I tested it and it works fine. For Fixed by: 5f4f7fd |
0e498ce to
5f4f7fd
Compare
Follow-on to the Rails 3.3.4 upgrade PR, this PR upgrades Rails to 7.2.
bundle update rails ....keep adding to the list until no Gem conflicts.composite_primary_keysgem, as support is now present in Rails as of 7.1. See: https://www.honeybadger.io/blog/composite-keys-in-rails/TODO