Skip to content
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

feat: support Rails 7.1 #502

Merged
merged 12 commits into from
Nov 16, 2023
Merged

feat: support Rails 7.1 #502

merged 12 commits into from
Nov 16, 2023

Conversation

G-Rath
Copy link
Contributor

@G-Rath G-Rath commented Oct 5, 2023

Resolves #500

This aims to be the minimal changes required for the template to work with Rails 7.1

Things which are not in scope for this PR

  • Rails now generates docker related files - I've forced/skipped those because their docker is focused on production and the diff is quite large so I think it's best to tackle that as its own separate thing

TODO

  • Do the basic upgrade
  • Adjust frontend-base to account for Shakapacker now doing a thing we previously did ourselves.
  • Rack::Handler is deprecated and replaced by Rackup::Handler warning. This appears during system tests. It is a knownw Capybara issue which is fixed but waiting on a gem release. Since this is just a warning and will go away in due course, we can ignore it.
  • Resolve Setting 'useContentHash' to 'false' in the production environment (specified by NODE_ENV environment variable) is not allowed! Content hashes get added to the filenames regardless of setting useContentHash in 'shakapacker.yml' to false. warning. This warning seems to caused by the default shakapacker.yml. Shakapacker generates a shakapacker.yml file where useContentHash: false is set in the &default section and then useContentHash: true is explicitly set in the production section. It doesn't seem like a real problem so I think we can ignore this.
  • Make a decision about Discuss adopting Rails 7.1+ config.application_controller.raise_on_missing_callback_actions  #507 and implement it here
    • We have decided to leave this option commented out for now.
  • Make a decision about how to handle the Rails.application.secrets deprecation because it will be removed in 7.2. Should we still be generating config/secrets.yml #341 has good context on the last time we discussed this.

@@ -18,3 +18,7 @@
gsub_file "config/environments/development.rb",
"join('tmp', 'caching-dev.txt')",
'join("tmp/caching-dev.txt")'

gsub_file "config/environments/development.rb",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See issue #507 for discussion around this change

@eoinkelly eoinkelly added the WIP Work in progress label Oct 21, 2023
@G-Rath G-Rath marked this pull request as ready for review October 22, 2023 20:13
@G-Rath G-Rath marked this pull request as draft October 22, 2023 20:13
@lukeify
Copy link

lukeify commented Nov 2, 2023

As of 3 November in our Ruby Guild we have decided that encrypted secrets decision is not a blocker, we only need to decide on raise_on_missing_callback_actions (and option 1 within the linked issue seems fine).

@G-Rath G-Rath marked this pull request as ready for review November 16, 2023 22:58

gsub_file "config/environments/development.rb",
"config.action_controller.raise_on_missing_callback_actions = true",
"# config.action_controller.raise_on_missing_callback_actions = true"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are leaving this commented out for now and will land this PR.

@lukeify lukeify merged commit 62446f3 into main Nov 16, 2023
22 checks passed
@lukeify lukeify deleted the support-rails-71 branch November 16, 2023 23:01
@G-Rath G-Rath removed the WIP Work in progress label Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Rails 7.1
3 participants