-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Update Mastodon to Rails 6.1 #15910
Update Mastodon to Rails 6.1 #15910
Conversation
160be28
to
c05a891
Compare
896b26d
to
77a0f68
Compare
To elaborate on the “hooks surrounding database setup seem to have changed somehow”, when fiddling with my test setup, I often get the following:
This doesn't seem to occur in the CI, but still, something is off and I need to find what before this PR is ready. |
47e1e59
to
77d494c
Compare
Update tests to match new `rotp` version.
…_ssl Disabled force_ssl-related tests as they do not seem to be easily testable anymore.
This will yield better performances when deleting an account
Since Rails 6.1, ActionView adds preload links for javascript files in the Links header per default. In our case, that will bloat headers too much and potentially cause issues with reverse proxies. Furhermore, we don't need those links, as we already output them as HTML link tags.
77d494c
to
b72e59d
Compare
Marked as ready for review, as I'm fairly happy with how it looks now, with the following caveats:
|
I have found no regression so far, but clearing the Rails cache is required as some of the stored objects are Rails models that don't load quite the same on Rails 6.1. |
As ClearlyClaire wrote, this change seems to make the data in Rails' cache inconsistent with the code resulting with errors like below. Clearing the cache with
seems to have resolved the inconsistency.
|
* Update devise-two-factor to unreleased fork for Rails 6 support Update tests to match new `rotp` version. * Update nsa gem to unreleased fork for Rails 6 support * Update rails to 6.1.3 and rails-i18n to 6.0 * Update to unreleased fork of pluck_each for Ruby 6 support * Run "rails app:update" * Add missing ActiveStorage config file * Use config.ssl_options instead of removed ApplicationController#force_ssl Disabled force_ssl-related tests as they do not seem to be easily testable anymore. * Fix nonce directives by removing Rails 5 specific monkey-patching * Fix fixture_file_upload deprecation warning * Fix yield-based test failing with Rails 6 * Use Rails 6's index_with when possible * Use ActiveRecord::Cache::Store#delete_multi from Rails 6 This will yield better performances when deleting an account * Disable Rails 6.1's automatic preload link headers Since Rails 6.1, ActionView adds preload links for javascript files in the Links header per default. In our case, that will bloat headers too much and potentially cause issues with reverse proxies. Furhermore, we don't need those links, as we already output them as HTML link tags. * Switch to Rails 6.0 default config * Switch to Rails 6.1 default config * Do not include autoload paths in the load path
PRs to merge first:
PRs to consider first:
This is work in progress, some tests are still failing:
increment_count!
to handle race conditions isn't working correctly. Addressed by Improve account counters handling #15913force_ssl
config do not work anymore, i am not sure how to test thoseOther broken things to look fix:
Nice to have:
This PR also does not switch to the new framework defaults yet, this means, among other things, that zeitwerk isn't enabled yet, and will require more work.