-
Notifications
You must be signed in to change notification settings - Fork 662
AO3-7231 Upgrade gems and configs to Rails 8.0.x #5515
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
base: master
Are you sure you want to change the base?
Changes from all commits
fecbdd4
8fd90f0
b119a34
d021bef
0f97a02
691cfe8
579fc0e
8bf5c17
7e33f1e
3c079f5
c3f8b1c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,8 +6,8 @@ gem 'test-unit', '~> 3.2' | |
|
|
||
| gem 'bundler' | ||
|
|
||
| gem "rails", "~> 7.2" | ||
| gem "rails-i18n" | ||
| gem "rails", "~> 8.0.0" | ||
| gem "rails-i18n", "~> 8.0", git: "https://github.com/svenfuchs/rails-i18n", ref: "54c1c7c2fdcc311427ec6f1dadd298a60db1ddef" | ||
| gem "rack", "~> 2.2" | ||
| gem "sprockets", "< 4" | ||
|
|
||
|
|
@@ -107,13 +107,13 @@ gem 'kgio', '2.10.0' | |
| gem "marcel", "1.0.2" | ||
|
|
||
| # Library for helping run pt-online-schema-change commands: | ||
| gem "departure", "~> 6.8" | ||
| gem "departure", "~> 8.0" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Didn't see anything of note in the changelog. Note that 8.0.1 seems to have not been published to rubygems (if it does get published I would like to pull it in). |
||
|
|
||
| gem "rack-timeout" | ||
| gem "puma_worker_killer" | ||
|
|
||
| group :test do | ||
| gem "rspec-rails", "~> 6.0" | ||
| gem "rspec-rails", "~> 8.0" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changelog, nothing stood out as well. |
||
| gem 'pickle' | ||
| gem "shoulda-matchers" | ||
| gem "capybara" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| class ErrorsController < ApplicationController | ||
| %w[403 404 422 500].each do |error_code| | ||
| %w[400 403 404 422 500].each do |error_code| | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this related to the new version, or just completeness?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. More for completeness - the new version just wanted
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In my opinion we should decide on one place to handle it, probably the public file, not here.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since there are multiple error codes here that have been there already, let's do this in a follow-up ticket (something like "standardise HTTP error handling" maybe)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean for this one specific new error 400, just don't add it to the ErrorsController. The other errors are fine to stay here |
||
| define_method error_code.to_sym do | ||
| render error_code, status: error_code.to_i, formats: :html | ||
| end | ||
|
|
||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rails 8.0 now saves the parent model (tag set) before the child model (owned tag set), so we can't always touch it here (after_save). In that case the child model (owned tag set) is going to be saved after anyways, so it's fine to just skip touching. This change looks to be a side effect of rails/rails#49847, but I think this ordering makes more sense so we were probably just depending on buggy behaviour.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking at your reproduction, did you have a poke around whether any other models are affected by the parent after save/after create being moved around?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (Feel free to just say "no" and we will rely on the automatic tests) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <h2 class="heading">Error 400</h2> | ||
| <h3 class="heading">Bad Request</h3> | ||
| <p>The server cannot process the request due to a client error.</p> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| #!/usr/bin/env ruby | ||
| exec "./bin/rails", "server", *ARGV |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,7 @@ class Application < Rails::Application | |
| # These settings can be overridden in specific environments using the files | ||
| # in config/environments, which are processed later. | ||
|
|
||
| config.load_defaults 7.2 | ||
| config.load_defaults 8.0 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New framework defaults I looked at all the uses of I don't see anything wrong with this. I think 1s should be plenty of time. Do we have any important complex regexps?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
not sure if complex, but word counting is very important, likely to have very large input and is a regex (ref WordCounter). Maybe test it locally with a very very long chapter and see whether it's an issue? |
||
|
|
||
| %w[ | ||
| app/models/challenge_models | ||
|
|
@@ -105,9 +105,6 @@ class Application < Rails::Application | |
| # Use Resque to run ActiveJobs (including sending delayed mail): | ||
| config.active_job.queue_adapter = :resque | ||
|
|
||
| # TODO: Remove with Rails 8.0 where this option will be deprecated | ||
| config.active_job.enqueue_after_transaction_commit = :always | ||
|
|
||
| config.active_model.i18n_customize_full_message = true | ||
|
|
||
| config.action_mailer.default_url_options = { host: ArchiveConfig.APP_HOST, protocol: "https" } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crashes without an unreleased bugfix. Technically this version targets rails 8.1, but it looks like there are only new keys for 8.1 (none changed/removed) so it shouldn't cause any problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do the rails-i18n upgrade steps in https://github.com/otwcode/otwarchive/blob/master/config/locales/README.md