-
Notifications
You must be signed in to change notification settings - Fork 10
Upgrade Ruby (3.1.4 -> 3.3.8) & Rails (7.1.3 -> 7.2.2.1) #749
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
Conversation
…ix deprecation warning
Note that I also removed `config.assets.debug = true` since I don't see why we would need this. Maybe we will stumble upon a scenario in the future, but then at least we know why we need it. Note also that this was 8 years old.
In the end, I ended up with `docker_development.rb` being exactly the same as `development.rb` 😅 Except for the last line: `config.web_console.development_only = false`.
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 went again through everything and pushed some more commits for the rest of the changes. The body of my commit messages explain key points.
Note that I've activated
config.action_view.annotate_rendered_view_with_filenames = true
which I think is pretty handy for development, e.g. see the browser console now:

One you've reviewed my changes as well, feel free to squash-merge into dev
after tests run through successfully.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #749 +/- ##
======================================
Coverage ? 54.21%
======================================
Files ? 178
Lines ? 7490
Branches ? 0
======================================
Hits ? 4061
Misses ? 3429
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I removed that as I thought this was done by default, but turns out this is not true for our specific option with $stdout. Config level is by default set to debug for all environments except production. This is done by Rails itself (7.2 defaults).
Note: This PR has a "best before" date: 2025-03-31, see here. The respective Ruby on Rails upgrade guide is here.
This PR upgrades Ruby to 3.3.7 and Rails to 7.2.2.1 (and in particular resolves #611 and goes most of the way for #709), and some gems that needed an upgrade in order to make the Rails upgrade work. So far, it seems to work mostly nicely. Several deprecation warnings were shown; I fixed them all except one (see below),
and some unit tests are failing (see below).
Important
For your local setup to still work after this PR, perform the steps outlined here in the wiki.
Furthermore, since we are changing the Docker base image (
FROM
), you have to rebuild all MaMpf Docker Containers from scratch.Notes for the reviewer:
app:update
script overwrite ourpuma.rb
file which seemed quite out of date compared to the current standard one. One notable difference is the handling of the pid file. Before, it wasNow, it is
On partiulcar, if we need the PID file in production, we should set an environment variable. I am not sure: We have
in
production/entrypoint_worker.sh
."development"
referring to a "development" environment. Do we need that? All our development takes place indocker_development
.production.rb
ccontains the lineconfig.force_ssl = true
. I added it, but put it in a comment. We should find out what happens if we uncomment it.docker_development.rb
I added the following lines wich come form the current Rails default devlopment file:I think the first one makes sense, and the second one should remain a comment since we have our own rubocop thing going on.
See here. It appears we could get rid of it if we upgrade sass-loader to v16 in our yarn modules, but do we want that? It seems that vite offers a better solution, see here.
so this seems to refer to this. But in
config/environments/test.rb
we already setUpdate: I guess the problem is in
config/initializers/active_job.rb
where we set (for all environments)which probably overrides the
:test
setting. Do we have tests (unit or cypress) that rely on sidekiq? If not, we could just do a conditional here.active_support.cache_format_version
: I think we should be able to safely change this in production now (which happens automatically in this PR since we use the Rails 7.2 framework defaults inapplication.rb
).