-
Notifications
You must be signed in to change notification settings - Fork 17
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
Upgrade Rails to version 7.2.1 #3306
Conversation
2930f88
to
1a0ddbe
Compare
@@ -0,0 +1,7 @@ | |||
#!/usr/bin/env ruby |
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.
Added by Rails app:update
bin/bundle
Outdated
@@ -1,3 +1,114 @@ | |||
#!/usr/bin/env ruby |
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.
Updating this file was suggested by Rails.
@@ -0,0 +1,8 @@ | |||
#!/usr/bin/env ruby |
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.
Added in order to support the config option.
@@ -1,8 +1,8 @@ | |||
#!/usr/bin/env ruby | |||
require "fileutils" | |||
|
|||
# path to your application root. |
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.
Changes suggested by rails app:update
# Please, add to the `ignore` list any other `lib` subdirectories that do | ||
# not contain `.rb` files, or that should not be reloaded or eager loaded. | ||
# Common ones are `templates`, `generators`, or `middleware`, for example. | ||
config.autoload_lib(ignore: %w[assets tasks]) |
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.
Change suggested by rails app:update
@@ -1,11 +1,13 @@ | |||
# Be sure to restart your server when you modify this file. |
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.
Changes suggested by rails app:update.
@@ -4,21 +4,21 @@ | |||
<title>The page you were looking for doesn't exist (404)</title> |
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.
Changes suggested by rails app:update.
@@ -0,0 +1,66 @@ | |||
<!DOCTYPE html> |
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.
File added by rails app:update.
@@ -4,21 +4,21 @@ | |||
<title>The change you wanted was rejected (422)</title> |
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.
Changes suggested by rails app:update.
@@ -4,21 +4,21 @@ | |||
<title>We're sorry, but something went wrong (500)</title> |
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.
Changes suggested by rails app:update.
The default 7.2 config enables YJIT if Ruby version is at least 3.3. The current version of Ruby in this app is lower than that, but I tested this with Ruby 3.3.4. |
1a0ddbe
to
ba7f53c
Compare
config/application.rb
Outdated
|
||
# Settings in config/environments/* take precedence over those specified here. | ||
# Application configuration can go into files in config/initializers | ||
# -- all .rb files in that directory are automatically loaded after loading | ||
# the framework and any gems in your application. | ||
|
||
# Custom directories with classes and modules you want to be autoloadable. | ||
config.autoload_paths += %W[#{config.root}/lib] | ||
config.autoload_paths += %W[#{config.root}/lib #{config.root}/lib/helpers] |
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.
Allow /lib/helpers to be autoloaded after migrating to 7.2 config. This resolves a bug e.g. in the Heroku review app.
I have removed the icon files. |
I'm updating the ticket to upgrade to 7.2.1 |
ba7f53c
to
9144135
Compare
Done |
9144135
to
ce776d6
Compare
ce776d6
to
4a500a0
Compare
4a500a0
to
f9975c8
Compare
f9975c8
to
c12cb4d
Compare
c12cb4d
to
a565590
Compare
config.action_controller.raise_on_missing_callback_actions = false | ||
|
||
# Apply autocorrection by RuboCop to files generated by `bin/rails generate`. | ||
config.generators.apply_rubocop_autocorrect_after_generate! |
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.
Enabled so our rubocop rules apply automatically.
a565590
to
adc2015
Compare
@@ -52,10 +52,13 @@ | |||
# config.i18n.raise_on_missing_translations = true | |||
|
|||
# Annotate rendered view with file names. | |||
# config.action_view.annotate_rendered_view_with_filenames = true | |||
config.action_view.annotate_rendered_view_with_filenames = true |
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.
Not a blocker, but would be nice to call out why we're enabling this
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.
It is a change suggested by app:update.
As it only applies to the development environment, it's safe to apply with no impact on tests or production.
It helps in debugging. Here is the description of what it does: https://www.bigbinary.com/blog/rails-6-1-adds-annotate_rendered_view_with_filenames-to-annotate-html-output
What is your opinion on that?
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.
I think 'It helps in debugging.' is enough. Just so people looking back can understand why we decided to uncomment it.
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.
Also I think this conversation is probably enough documentation too! So I think all good to be merged! 💪🏻
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.
Looks good!
One non-blocking comment :)
Follow these steps if you are doing a Rails upgrade.
What
Upgrade government-frontend to use the latest version of Rails (7.2.1).
Why
Trello card