Point Gemfile.next at Rails 8.0 (7.2 -> 8.0 hop)#70
Merged
Conversation
Promote the previous next target to current and open the next hop: - current (else): Rails 7.1 -> 7.2 (now locked at 7.2.3.1) - next (next?): Rails 7.2 -> 8.0 (locked at 8.0.5) Both Gemfile.lock and Gemfile.next.lock regenerated via `bundle update rails`; each resolved cleanly with no conflicts. Verified on the host (asdf ruby 3.2.11, matches Gemfile) against an ephemeral Postgres 16.13: - Gemfile (7.2.3.1): boot OK, suite green (16 runs, 52 assertions, 0 failures, 0 errors). - Gemfile.next (8.0.5): boot OK, suite green (16 runs, 52 assertions, 0 failures, 0 errors). Rails 8.1 already surfaces one deprecation on boot under 8.0 (`to_time` timezone-preservation); noted for the next hop, no action needed now. Also simplify docker/entrypoint.sh: drop the 5-attempt db:prepare retry loop for a single `bundle exec rails db:prepare`. And ignore /vendor/bundle_localtest, the host-side BUNDLE_PATH used to run the suite against both Gemfiles without rebuilding the Docker image.
Two deprecations surfaced booting/precompiling under the 7.2 -> 8.0 hop:
1. `config.read_encrypted_secrets = true` (production.rb) drove the legacy
encrypted-secrets feature (config/secrets.yml.enc), which was removed
alongside config/secrets.yml back in 7.2. It warns on 7.2 ("deprecated
and will be removed in Rails 8.0") and is a silent no-op on 8.0 -- dead
config either way. Removed the line and its comment block. The app has
no secrets.yml.enc / credentials, so nothing to migrate.
2. `to_time` timezone preservation: under `load_defaults 7.1`,
ActiveSupport hasn't opted into the 8.1 default, so 8.0 warns at boot.
Set `config.active_support.to_time_preserves_timezone = :zone`
explicitly in application.rb. Verified the value is accepted on both
7.2.3.1 and 8.0.5, so it's set unconditionally (no dual-boot branch).
Verified: both Gemfiles boot clean in production with zero deprecation
warnings, and both suites stay green (16 runs, 52 assertions, 0 failures,
0 errors).
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.
What
Advances the dual boot one hop: promote the previous
nexttarget to current and open the next hop.else): Rails 7.1 -> 7.2 (locked at 7.2.3.1)if next?): Rails 7.2 -> 8.0 (locked at 8.0.5)Both
Gemfile.lockandGemfile.next.lockregenerated viabundle update rails; each resolved cleanly with no conflicts.Deprecation cleanup
Two deprecations surfaced booting/precompiling under 8.0; both fixed here:
config.read_encrypted_secrets = true(production.rb) drove the legacy encrypted-secrets feature (config/secrets.yml.enc), removed alongsideconfig/secrets.ymlback in 7.2. It warns on 7.2 (deprecated and will be removed in Rails 8.0) and is a silent no-op on 8.0 -- dead config either way. Removed the line and its comment block. Nosecrets.yml.enc/ credentials in the app, so nothing to migrate.to_timetimezone preservation: underload_defaults 7.1, ActiveSupport hasn't opted into the 8.1 default, so 8.0 warns at boot. Setconfig.active_support.to_time_preserves_timezone = :zoneinapplication.rb. Verified the value is accepted on both 7.2.3.1 and 8.0.5, so it's set unconditionally (no dual-boot branch).Other
docker/entrypoint.sh: dropped the 5-attemptdb:prepareretry loop for a singlebundle exec rails db:prepare..gitignore: ignore/vendor/bundle_localtest(the host-sideBUNDLE_PATHused to run the suite against both Gemfiles without rebuilding the Docker image).Verification
Run on the host (asdf ruby 3.2.11, matching the Gemfile) against an ephemeral Postgres 16.13:
The detection patterns for both deprecations are added to the rails-upgrade skill in ombulabs/claude-code_rails-upgrade-skill#122.