Conversation
mroderick
reviewed
Aug 6, 2025
ad5e608 to
ef2035f
Compare
Collaborator
Author
|
@matyikriszta we got to done! |
mroderick
approved these changes
Aug 22, 2025
Collaborator
mroderick
left a comment
There was a problem hiding this comment.
Very nice PR, easy to follow each step.
Let's merge this with a rebase, so we can use git bisect to easily determine which commit causes problems, in case of ... well, problems :)
This upgrades the gem, and following commits will change configuration, using the "rails app:update" process.
This amended all the configuration files with manually-edited new diffs, getting rid of outdated configuration where known to be outdated. We wish to keep close to the default configuration, to make updates using these diff scripts easy.
Zeitwerk is the code loader in Rails. It expects files to define classes by a convention that it explains very clearly: Zeitwerk::NameError: expected file /home/runner/work/planner/planner/lib/services/event_calendar.rb to define constant Services::EventCalendar, but didn't
In order to avoid Zeitwerk expectations failing.
These files are meant to be used during upgrades, not kept around.
These are meant to be dropped after updating to a version. We are currently setting all of these defaults, using a defaults setting in config/application.rb, so the file no longer does anything.
One model needed changing: that callback is run in another order (now: Rails runs them in the declared order, not the reverse order, as before). One test needed to not require code on its own.
When we have run this code for a while, we can remove this Rails 7.0-compatible fallback code. The links in the code comment lead to where we need to change when we upgrade, one more time.
Contributor
|
I think the gemfile on this needs a bump? |
jonodrew
approved these changes
Aug 27, 2025
Contributor
jonodrew
left a comment
There was a problem hiding this comment.
This is a phenomenal piece of work and I'm so excited to see it go in!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR upgrades the code base to use Rails 7.1. It is a part of upgrading Rails to latest stable release. Our method is the recommended "one minor at a time".
The PR is now draft, and will be turned into a regular PR when ready for it.The PR is ready for review!cc @mroderick.
Details
Errors to fix
Zeitwerk::NameError: expected file /home/runner/work/planner/planner/lib/services/event_calendar.rb to define constant Services::EventCalendar, but didn't # ./vendor/bundle/ruby/3.4.0/gems/zeitwerk-2.7.3/lib/zeitwerk/loader/callbacks.rb:31:in 'Zeitwerk::Loader::Callbacks#on_file_autoloaded'Unpermitted parameter: :format. Context: { controller: ChapterController, action: show, request: #<ActionDispatch::Request:0x000000012c45bc30>, params: {"controller" => "chapter", "action" => "show", "id" => "apple-touch-icon", "format" => "png"} } Chapter Load (11.6ms) SELECT "chapters".* FROM "chapters" WHERE "chapters"."active" = $1 AND "chapters"."slug" = $2 LIMIT $3 [["active", true], ["slug", "apple-touch-icon"], ["LIMIT", 1]] ↳ app/controllers/chapter_controller.rb:3:in 'ChapterController#show' Completed 404 Not Found in 593ms (ActiveRecord: 49.0ms | Allocations: 118818)spec/lib/verifier_spec.rb:9make the Verifier test pass - there is a setting that upgrades the verifier serialization, assess impact of upgrading it1) Verifier generates access_token for an id Failure/Error: expect(Verifier.new(id: 1).access_token).to be_eql('BAhpBg==--30d45b871c77098a0ba79cf27dd532650ca75531') expected `"MQ==--a3487195ba15b69d4aa07b7da0234463b82c96b3".eql?("BAhpBg==--30d45b871c77098a0ba79cf27dd532650ca75531")` to be truthy, got false # ./spec/lib/verifier_spec.rb:9:in 'block (2 levels) in <top (required)>' # ./spec/spec_helper.rb:114:in 'block (2 levels) in <top (required)>'Cleanup
Findings
Loose observations made during this:
Next steps
Getting this merged, and then continue upgrading.
Next up is an upgrade to Rails 7.2, and that can be started as soon as this has been merged.