Skip to content

Commit 544dc30

Browse files
authored
Load Rails 7.0 framework defaults
Every flag in new_framework_defaults_7_0.rb is enabled in the preceding commits, one per flag, so config.load_defaults 7.0 changes one thing beyond replacing the file: cache_format_version, which is explicitly held at 6.1. Rails 6.1 cannot read 7.0-format cache entries and production memcached outlives a Capistrano rollback, so adopting the new format would break rollback to the previous release during the post-deploy soak. It flips once this hop has soaked, or in the Rails 7.1 upgrade where the 7.0 format becomes the floor. This completes the defaults adoption for the Phase 2 hop. Part of #1355 Assisted-by: OpenCode:anthropic.claude-fable-5 Signed-off-by: Ben Fairless <ben@oaf.org.au>
1 parent 44c3f30 commit 544dc30

2 files changed

Lines changed: 9 additions & 104 deletions

File tree

‎config/application.rb‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,15 @@
2626
module Morph
2727
class Application < Rails::Application
2828
# Initialize configuration defaults for originally generated Rails version.
29-
config.load_defaults 6.1
29+
config.load_defaults 7.0
30+
31+
# Held back from the 7.0 defaults: Rails 6.1 cannot read 7.0-format
32+
# cache entries, and production memcached outlives a
33+
# `cap production deploy:rollback`, so adopting the new format would
34+
# break rollback to the previous release. Flip to 7.0 once this hop
35+
# has soaked in production (or in the Rails 7.1 upgrade, where 7.0
36+
# becomes the floor anyway).
37+
config.active_support.cache_format_version = 6.1
3038

3139
# Settings in config/environments/* take precedence over those specified here.
3240
# Application configuration can go into files in config/initializers

‎config/initializers/new_framework_defaults_7_0.rb‎

Lines changed: 0 additions & 103 deletions
This file was deleted.

0 commit comments

Comments
 (0)