From 88303c9a67dde752a395815576c5908f526bbc08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20V=C3=A1squez?= Date: Tue, 7 Jul 2026 13:25:40 -0600 Subject: [PATCH 1/2] Point Gemfile.next at Rails 8.0 (7.2 -> 8.0 hop) 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. --- .gitignore | 3 + Gemfile | 4 +- Gemfile.lock | 132 +++++++++++++++++++++---------------------- Gemfile.next.lock | 119 +++++++++++++++++++------------------- docker/entrypoint.sh | 16 +----- 5 files changed, 127 insertions(+), 147 deletions(-) diff --git a/.gitignore b/.gitignore index 001c4bb..ce96079 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,9 @@ # Ignore bundler config. /.bundle /vendor/bundle +# Local dual-boot bundle path (BUNDLE_PATH in .bundle/config) used to run the +# suite on the host against Gemfile/Gemfile.next without touching the Docker image. +/vendor/bundle_localtest # Ignore app config .env diff --git a/Gemfile b/Gemfile index 5fac193..e17f7f1 100644 --- a/Gemfile +++ b/Gemfile @@ -12,9 +12,9 @@ end ruby "3.2.11" if next? - gem "rails", ">= 7.2.0", "< 7.3.0" + gem "rails", ">= 8.0.0", "< 8.1.0" else - gem "rails", ">= 7.1.0", "< 7.2.0" + gem "rails", ">= 7.2.0", "< 7.3.0" end gem "bundler-audit" diff --git a/Gemfile.lock b/Gemfile.lock index d14f3d5..3aec4ad 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -14,85 +14,79 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (7.1.6) - actionpack (= 7.1.6) - activesupport (= 7.1.6) + actioncable (7.2.3.1) + actionpack (= 7.2.3.1) + activesupport (= 7.2.3.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.1.6) - actionpack (= 7.1.6) - activejob (= 7.1.6) - activerecord (= 7.1.6) - activestorage (= 7.1.6) - activesupport (= 7.1.6) - mail (>= 2.7.1) - net-imap - net-pop - net-smtp - actionmailer (7.1.6) - actionpack (= 7.1.6) - actionview (= 7.1.6) - activejob (= 7.1.6) - activesupport (= 7.1.6) - mail (~> 2.5, >= 2.5.4) - net-imap - net-pop - net-smtp + actionmailbox (7.2.3.1) + actionpack (= 7.2.3.1) + activejob (= 7.2.3.1) + activerecord (= 7.2.3.1) + activestorage (= 7.2.3.1) + activesupport (= 7.2.3.1) + mail (>= 2.8.0) + actionmailer (7.2.3.1) + actionpack (= 7.2.3.1) + actionview (= 7.2.3.1) + activejob (= 7.2.3.1) + activesupport (= 7.2.3.1) + mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.1.6) - actionview (= 7.1.6) - activesupport (= 7.1.6) + actionpack (7.2.3.1) + actionview (= 7.2.3.1) + activesupport (= 7.2.3.1) cgi nokogiri (>= 1.8.5) racc - rack (>= 2.2.4) + rack (>= 2.2.4, < 3.3) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - actiontext (7.1.6) - actionpack (= 7.1.6) - activerecord (= 7.1.6) - activestorage (= 7.1.6) - activesupport (= 7.1.6) + useragent (~> 0.16) + actiontext (7.2.3.1) + actionpack (= 7.2.3.1) + activerecord (= 7.2.3.1) + activestorage (= 7.2.3.1) + activesupport (= 7.2.3.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.1.6) - activesupport (= 7.1.6) + actionview (7.2.3.1) + activesupport (= 7.2.3.1) builder (~> 3.1) cgi erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.1.6) - activesupport (= 7.1.6) + activejob (7.2.3.1) + activesupport (= 7.2.3.1) globalid (>= 0.3.6) - activemodel (7.1.6) - activesupport (= 7.1.6) - activerecord (7.1.6) - activemodel (= 7.1.6) - activesupport (= 7.1.6) + activemodel (7.2.3.1) + activesupport (= 7.2.3.1) + activerecord (7.2.3.1) + activemodel (= 7.2.3.1) + activesupport (= 7.2.3.1) timeout (>= 0.4.0) - activestorage (7.1.6) - actionpack (= 7.1.6) - activejob (= 7.1.6) - activerecord (= 7.1.6) - activesupport (= 7.1.6) + activestorage (7.2.3.1) + actionpack (= 7.2.3.1) + activejob (= 7.2.3.1) + activerecord (= 7.2.3.1) + activesupport (= 7.2.3.1) marcel (~> 1.0) - activesupport (7.1.6) + activesupport (7.2.3.1) base64 benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) logger (>= 1.4.2) - minitest (>= 5.1) - mutex_m + minitest (>= 5.1, < 6) securerandom (>= 0.3) - tzinfo (~> 2.0) + tzinfo (~> 2.0, >= 2.0.5) addressable (2.9.0) public_suffix (>= 2.0.2, < 8.0) ast (2.4.3) @@ -243,7 +237,6 @@ GEM mini_mime (1.1.5) mini_portile2 (2.8.9) minitest (5.27.0) - mutex_m (0.3.0) net-imap (0.6.4.1) date net-protocol @@ -279,20 +272,20 @@ GEM rackup (1.0.1) rack (< 3) webrick - rails (7.1.6) - actioncable (= 7.1.6) - actionmailbox (= 7.1.6) - actionmailer (= 7.1.6) - actionpack (= 7.1.6) - actiontext (= 7.1.6) - actionview (= 7.1.6) - activejob (= 7.1.6) - activemodel (= 7.1.6) - activerecord (= 7.1.6) - activestorage (= 7.1.6) - activesupport (= 7.1.6) + rails (7.2.3.1) + actioncable (= 7.2.3.1) + actionmailbox (= 7.2.3.1) + actionmailer (= 7.2.3.1) + actionpack (= 7.2.3.1) + actiontext (= 7.2.3.1) + actionview (= 7.2.3.1) + activejob (= 7.2.3.1) + activemodel (= 7.2.3.1) + activerecord (= 7.2.3.1) + activestorage (= 7.2.3.1) + activesupport (= 7.2.3.1) bundler (>= 1.15.0) - railties (= 7.1.6) + railties (= 7.2.3.1) rails-dom-testing (2.3.0) activesupport (>= 5.0.0) minitest @@ -300,11 +293,11 @@ GEM rails-html-sanitizer (1.7.0) loofah (~> 2.25) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - railties (7.1.6) - actionpack (= 7.1.6) - activesupport (= 7.1.6) + railties (7.2.3.1) + actionpack (= 7.2.3.1) + activesupport (= 7.2.3.1) cgi - irb + irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) thor (~> 1.0, >= 1.2.2) @@ -410,6 +403,7 @@ GEM uglifier (4.2.1) execjs (>= 0.3.0, < 3) unicode-display_width (2.6.0) + useragent (0.16.11) web-console (4.2.1) actionview (>= 6.0.0) activemodel (>= 6.0.0) @@ -449,7 +443,7 @@ DEPENDENCIES nokogiri (>= 1.13.0) pg (~> 1.1) puma (~> 3.7) - rails (>= 7.1.0, < 7.2.0) + rails (>= 7.2.0, < 7.3.0) redcarpet reek rubocop-rails-omakase diff --git a/Gemfile.next.lock b/Gemfile.next.lock index 3aec4ad..3609456 100644 --- a/Gemfile.next.lock +++ b/Gemfile.next.lock @@ -14,68 +14,65 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (7.2.3.1) - actionpack (= 7.2.3.1) - activesupport (= 7.2.3.1) + actioncable (8.0.5) + actionpack (= 8.0.5) + activesupport (= 8.0.5) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.2.3.1) - actionpack (= 7.2.3.1) - activejob (= 7.2.3.1) - activerecord (= 7.2.3.1) - activestorage (= 7.2.3.1) - activesupport (= 7.2.3.1) + actionmailbox (8.0.5) + actionpack (= 8.0.5) + activejob (= 8.0.5) + activerecord (= 8.0.5) + activestorage (= 8.0.5) + activesupport (= 8.0.5) mail (>= 2.8.0) - actionmailer (7.2.3.1) - actionpack (= 7.2.3.1) - actionview (= 7.2.3.1) - activejob (= 7.2.3.1) - activesupport (= 7.2.3.1) + actionmailer (8.0.5) + actionpack (= 8.0.5) + actionview (= 8.0.5) + activejob (= 8.0.5) + activesupport (= 8.0.5) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.2.3.1) - actionview (= 7.2.3.1) - activesupport (= 7.2.3.1) - cgi + actionpack (8.0.5) + actionview (= 8.0.5) + activesupport (= 8.0.5) nokogiri (>= 1.8.5) - racc - rack (>= 2.2.4, < 3.3) + rack (>= 2.2.4) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (7.2.3.1) - actionpack (= 7.2.3.1) - activerecord (= 7.2.3.1) - activestorage (= 7.2.3.1) - activesupport (= 7.2.3.1) + actiontext (8.0.5) + actionpack (= 8.0.5) + activerecord (= 8.0.5) + activestorage (= 8.0.5) + activesupport (= 8.0.5) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.2.3.1) - activesupport (= 7.2.3.1) + actionview (8.0.5) + activesupport (= 8.0.5) builder (~> 3.1) - cgi erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.2.3.1) - activesupport (= 7.2.3.1) + activejob (8.0.5) + activesupport (= 8.0.5) globalid (>= 0.3.6) - activemodel (7.2.3.1) - activesupport (= 7.2.3.1) - activerecord (7.2.3.1) - activemodel (= 7.2.3.1) - activesupport (= 7.2.3.1) + activemodel (8.0.5) + activesupport (= 8.0.5) + activerecord (8.0.5) + activemodel (= 8.0.5) + activesupport (= 8.0.5) timeout (>= 0.4.0) - activestorage (7.2.3.1) - actionpack (= 7.2.3.1) - activejob (= 7.2.3.1) - activerecord (= 7.2.3.1) - activesupport (= 7.2.3.1) + activestorage (8.0.5) + actionpack (= 8.0.5) + activejob (= 8.0.5) + activerecord (= 8.0.5) + activesupport (= 8.0.5) marcel (~> 1.0) - activesupport (7.2.3.1) + activesupport (8.0.5) base64 benchmark (>= 0.3) bigdecimal @@ -84,9 +81,10 @@ GEM drb i18n (>= 1.6, < 2) logger (>= 1.4.2) - minitest (>= 5.1, < 6) + minitest (>= 5.1) securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) addressable (2.9.0) public_suffix (>= 2.0.2, < 8.0) ast (2.4.3) @@ -131,7 +129,6 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - cgi (0.5.2) climate_control (1.2.0) clipboard-rails (1.7.1) coffee-rails (5.0.0) @@ -272,20 +269,20 @@ GEM rackup (1.0.1) rack (< 3) webrick - rails (7.2.3.1) - actioncable (= 7.2.3.1) - actionmailbox (= 7.2.3.1) - actionmailer (= 7.2.3.1) - actionpack (= 7.2.3.1) - actiontext (= 7.2.3.1) - actionview (= 7.2.3.1) - activejob (= 7.2.3.1) - activemodel (= 7.2.3.1) - activerecord (= 7.2.3.1) - activestorage (= 7.2.3.1) - activesupport (= 7.2.3.1) + rails (8.0.5) + actioncable (= 8.0.5) + actionmailbox (= 8.0.5) + actionmailer (= 8.0.5) + actionpack (= 8.0.5) + actiontext (= 8.0.5) + actionview (= 8.0.5) + activejob (= 8.0.5) + activemodel (= 8.0.5) + activerecord (= 8.0.5) + activestorage (= 8.0.5) + activesupport (= 8.0.5) bundler (>= 1.15.0) - railties (= 7.2.3.1) + railties (= 8.0.5) rails-dom-testing (2.3.0) activesupport (>= 5.0.0) minitest @@ -293,10 +290,9 @@ GEM rails-html-sanitizer (1.7.0) loofah (~> 2.25) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - railties (7.2.3.1) - actionpack (= 7.2.3.1) - activesupport (= 7.2.3.1) - cgi + railties (8.0.5) + actionpack (= 8.0.5) + activesupport (= 8.0.5) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -403,6 +399,7 @@ GEM uglifier (4.2.1) execjs (>= 0.3.0, < 3) unicode-display_width (2.6.0) + uri (1.1.1) useragent (0.16.11) web-console (4.2.1) actionview (>= 6.0.0) @@ -443,7 +440,7 @@ DEPENDENCIES nokogiri (>= 1.13.0) pg (~> 1.1) puma (~> 3.7) - rails (>= 7.2.0, < 7.3.0) + rails (>= 8.0.0, < 8.1.0) redcarpet reek rubocop-rails-omakase diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 3159ea6..87c9602 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -11,20 +11,6 @@ fi rm -f tmp/pids/server.pid tmp/pids/server_next.pid -# web and web_next share the same database and both run db:prepare on boot. -# If they start around the same time, ActiveRecord's migration lock makes the -# second one fail with ConcurrentMigrationError; retry instead of giving up, -# since the migration itself is a no-op once the first process finishes. -for attempt in 1 2 3 4 5; do - if bundle exec rails db:prepare; then - break - elif [ "$attempt" -eq 5 ]; then - echo "db:prepare failed after $attempt attempts" >&2 - exit 1 - else - echo "db:prepare failed (attempt $attempt/5), retrying in 3s..." >&2 - sleep 3 - fi -done +bundle exec rails db:prepare exec "$@" From bddfed73d391fb8685859d03246d6d419ac90b6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20V=C3=A1squez?= Date: Tue, 7 Jul 2026 13:32:33 -0600 Subject: [PATCH 2/2] Clear Rails 8.0 boot/precompile deprecation warnings 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). --- config/application.rb | 6 ++++++ config/environments/production.rb | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/config/application.rb b/config/application.rb index a09af72..2819189 100644 --- a/config/application.rb +++ b/config/application.rb @@ -28,6 +28,12 @@ class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 7.1 + # Rails 8.0 deprecates the boolean/offset form of this setting; opt into the + # timezone-preserving behavior (the default from Rails 8.1 on) explicitly so + # `to_time` keeps the full zone rather than a bare UTC offset. Valid under + # both 7.2 and 8.0, so it's safe to set unconditionally during the dual boot. + config.active_support.to_time_preserves_timezone = :zone + # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. diff --git a/config/environments/production.rb b/config/environments/production.rb index 3b07ff5..7187415 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -17,11 +17,6 @@ config.consider_all_requests_local = false config.action_controller.perform_caching = true - # Attempt to read encrypted secrets from `config/secrets.yml.enc`. - # Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or - # `config/secrets.yml.key`. - config.read_encrypted_secrets = true - # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this. config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?