From 574315a6cc701fab91eb51c30c98c2708788620c Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Fri, 8 Aug 2025 13:20:45 +0200 Subject: [PATCH 1/4] activerecord: Update to Rails 8.0 --- benchmarks/activerecord/Gemfile | 4 ++-- benchmarks/activerecord/Gemfile.lock | 23 +++++++++++++---------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/benchmarks/activerecord/Gemfile b/benchmarks/activerecord/Gemfile index 4fa8a3ec..b62e12cc 100644 --- a/benchmarks/activerecord/Gemfile +++ b/benchmarks/activerecord/Gemfile @@ -1,6 +1,6 @@ source "https://rubygems.org" -gem "activerecord", "~> 7.2" -gem "sqlite3", "~> 1.4", platform: :ruby +gem "activerecord", "~> 8.0" +gem "sqlite3", platform: :ruby gem "activerecord-jdbcsqlite3-adapter", "~> 70", platform: :jruby gem "mutex_m" gem "bigdecimal" diff --git a/benchmarks/activerecord/Gemfile.lock b/benchmarks/activerecord/Gemfile.lock index 1344f1fe..8777c77d 100644 --- a/benchmarks/activerecord/Gemfile.lock +++ b/benchmarks/activerecord/Gemfile.lock @@ -1,13 +1,13 @@ GEM remote: https://rubygems.org/ specs: - activemodel (7.2.2.1) - activesupport (= 7.2.2.1) - activerecord (7.2.2.1) - activemodel (= 7.2.2.1) - activesupport (= 7.2.2.1) + activemodel (8.0.2) + activesupport (= 8.0.2) + activerecord (8.0.2) + activemodel (= 8.0.2) + activesupport (= 8.0.2) timeout (>= 0.4.0) - activesupport (7.2.2.1) + activesupport (8.0.2) base64 benchmark (>= 0.3) bigdecimal @@ -19,6 +19,7 @@ GEM minitest (>= 5.1) securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) base64 (0.3.0) benchmark (0.4.1) bigdecimal (3.2.2) @@ -32,23 +33,25 @@ GEM minitest (5.25.5) mutex_m (0.3.0) securerandom (0.4.1) - sqlite3 (1.7.3) + sqlite3 (2.7.3) mini_portile2 (~> 2.8.0) + sqlite3 (2.7.3-x86_64-linux-gnu) timeout (0.4.3) tzinfo (2.0.6) concurrent-ruby (~> 1.0) + uri (1.0.3) PLATFORMS ruby x86_64-linux DEPENDENCIES - activerecord (~> 7.2) + activerecord (~> 8.0) activerecord-jdbcsqlite3-adapter (~> 70) base64 bigdecimal mutex_m - sqlite3 (~> 1.4) + sqlite3 BUNDLED WITH - 2.8.0.dev + 2.7.0 From 6ee8907f218ebd99f4f189e26558faa4468ecb0b Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Fri, 8 Aug 2025 13:24:06 +0200 Subject: [PATCH 2/4] railsbench: upgrade to Rails 8 --- benchmarks/railsbench/Gemfile | 4 +- benchmarks/railsbench/Gemfile.lock | 110 +++++++++--------- benchmarks/railsbench/config/application.rb | 2 +- .../config/environments/production.rb | 1 - 4 files changed, 60 insertions(+), 57 deletions(-) diff --git a/benchmarks/railsbench/Gemfile b/benchmarks/railsbench/Gemfile index b16b0c2a..5ca45db8 100644 --- a/benchmarks/railsbench/Gemfile +++ b/benchmarks/railsbench/Gemfile @@ -13,14 +13,14 @@ gem "cgi" # Workaround cgi extraction in Ruby 3.5.0-dev actiontext activejob activemodel activerecord activestorage activesupport railties ].each do |rails_gem| - gem rails_gem, '~> 7.2' + gem rails_gem, '~> 8.0' end gem 'sprockets-rails', '3.2.2' gem 'stackprof', platforms: :mri # Use sqlite3 as the database for Active Record -gem 'sqlite3', '~> 1.4', platform: :ruby +gem 'sqlite3', platform: :ruby gem 'activerecord-jdbcsqlite3-adapter', '~> 70', platform: :jruby # Use webrick for the web server since it's easy to install. # The web server is not used during the benchmark. diff --git a/benchmarks/railsbench/Gemfile.lock b/benchmarks/railsbench/Gemfile.lock index dfc0656a..eda89ffb 100644 --- a/benchmarks/railsbench/Gemfile.lock +++ b/benchmarks/railsbench/Gemfile.lock @@ -1,60 +1,59 @@ GEM remote: https://rubygems.org/ specs: - actionmailbox (7.2.2.1) - actionpack (= 7.2.2.1) - activejob (= 7.2.2.1) - activerecord (= 7.2.2.1) - activestorage (= 7.2.2.1) - activesupport (= 7.2.2.1) + actionmailbox (8.0.2) + actionpack (= 8.0.2) + activejob (= 8.0.2) + activerecord (= 8.0.2) + activestorage (= 8.0.2) + activesupport (= 8.0.2) mail (>= 2.8.0) - actionmailer (7.2.2.1) - actionpack (= 7.2.2.1) - actionview (= 7.2.2.1) - activejob (= 7.2.2.1) - activesupport (= 7.2.2.1) + actionmailer (8.0.2) + actionpack (= 8.0.2) + actionview (= 8.0.2) + activejob (= 8.0.2) + activesupport (= 8.0.2) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.2.2.1) - actionview (= 7.2.2.1) - activesupport (= 7.2.2.1) + actionpack (8.0.2) + actionview (= 8.0.2) + activesupport (= 8.0.2) nokogiri (>= 1.8.5) - racc - rack (>= 2.2.4, < 3.2) + 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.2.1) - actionpack (= 7.2.2.1) - activerecord (= 7.2.2.1) - activestorage (= 7.2.2.1) - activesupport (= 7.2.2.1) + actiontext (8.0.2) + actionpack (= 8.0.2) + activerecord (= 8.0.2) + activestorage (= 8.0.2) + activesupport (= 8.0.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.2.2.1) - activesupport (= 7.2.2.1) + actionview (8.0.2) + activesupport (= 8.0.2) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.2.2.1) - activesupport (= 7.2.2.1) + activejob (8.0.2) + activesupport (= 8.0.2) globalid (>= 0.3.6) - activemodel (7.2.2.1) - activesupport (= 7.2.2.1) - activerecord (7.2.2.1) - activemodel (= 7.2.2.1) - activesupport (= 7.2.2.1) + activemodel (8.0.2) + activesupport (= 8.0.2) + activerecord (8.0.2) + activemodel (= 8.0.2) + activesupport (= 8.0.2) timeout (>= 0.4.0) - activestorage (7.2.2.1) - actionpack (= 7.2.2.1) - activejob (= 7.2.2.1) - activerecord (= 7.2.2.1) - activesupport (= 7.2.2.1) + activestorage (8.0.2) + actionpack (= 8.0.2) + activejob (= 8.0.2) + activerecord (= 8.0.2) + activesupport (= 8.0.2) marcel (~> 1.0) - activesupport (7.2.2.1) + activesupport (8.0.2) base64 benchmark (>= 0.3) bigdecimal @@ -66,6 +65,7 @@ GEM minitest (>= 5.1) securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) base64 (0.3.0) benchmark (0.4.1) bigdecimal (3.2.2) @@ -118,6 +118,8 @@ GEM nokogiri (1.18.9) mini_portile2 (~> 2.8.2) racc (~> 1.4) + nokogiri (1.18.9-x86_64-linux-gnu) + racc (~> 1.4) pp (0.6.2) prettyprint prettyprint (0.2.0) @@ -138,9 +140,9 @@ GEM rails-html-sanitizer (1.6.2) loofah (~> 2.21) 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.2.1) - actionpack (= 7.2.2.1) - activesupport (= 7.2.2.1) + railties (8.0.2) + actionpack (= 8.0.2) + activesupport (= 8.0.2) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -159,14 +161,16 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sqlite3 (1.7.3) + sqlite3 (2.7.3) mini_portile2 (~> 2.8.0) + sqlite3 (2.7.3-x86_64-linux-gnu) stackprof (0.2.27) strscan (3.1.5) thor (1.4.0) timeout (0.4.3) tzinfo (2.0.6) concurrent-ruby (~> 1.0) + uri (1.0.3) useragent (0.16.11) webrick (1.7.0) zeitwerk (2.7.3) @@ -176,17 +180,17 @@ PLATFORMS x86_64-linux DEPENDENCIES - actionmailbox (~> 7.2) - actionmailer (~> 7.2) - actionpack (~> 7.2) - actiontext (~> 7.2) - actionview (~> 7.2) - activejob (~> 7.2) - activemodel (~> 7.2) - activerecord (~> 7.2) + actionmailbox (~> 8.0) + actionmailer (~> 8.0) + actionpack (~> 8.0) + actiontext (~> 8.0) + actionview (~> 8.0) + activejob (~> 8.0) + activemodel (~> 8.0) + activerecord (~> 8.0) activerecord-jdbcsqlite3-adapter (~> 70) - activestorage (~> 7.2) - activesupport (~> 7.2) + activestorage (~> 8.0) + activesupport (~> 8.0) base64 bigdecimal cgi @@ -196,12 +200,12 @@ DEPENDENCIES net-pop (~> 0.1.1) net-smtp (~> 0.2.1) psych (~> 3.3.2) - railties (~> 7.2) + railties (~> 8.0) sprockets-rails (= 3.2.2) - sqlite3 (~> 1.4) + sqlite3 stackprof tzinfo-data webrick (~> 1.7.0) BUNDLED WITH - 2.8.0.dev + 2.7.0 diff --git a/benchmarks/railsbench/config/application.rb b/benchmarks/railsbench/config/application.rb index 836e72f1..d1c1013f 100644 --- a/benchmarks/railsbench/config/application.rb +++ b/benchmarks/railsbench/config/application.rb @@ -21,7 +21,7 @@ module Railsbench class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 7.2 + config.load_defaults "#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}" # Please, add to the `ignore` list any other `lib` subdirectories that do # not contain `.rb` files, or that should not be reloaded or eager loaded. diff --git a/benchmarks/railsbench/config/environments/production.rb b/benchmarks/railsbench/config/environments/production.rb index 6ce7d2f1..e3e5d8c0 100644 --- a/benchmarks/railsbench/config/environments/production.rb +++ b/benchmarks/railsbench/config/environments/production.rb @@ -91,7 +91,6 @@ # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } # yjit-bench configurations - config.active_record.sqlite3_production_warning = false config.logger = nil config.secret_key_base = 'in general secret should not be in the git repo but this is a benchmark' # If we want to benchmark with YJIT then it has already been enabled by command line arguments. From 6c7bc0749c6411e286b82173f4e7c47b96c76100 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Fri, 8 Aug 2025 13:25:59 +0200 Subject: [PATCH 3/4] erubi-rails: upgrade to Rails 8 --- benchmarks/erubi-rails/Gemfile | 4 +- benchmarks/erubi-rails/Gemfile.lock | 116 +++++++++--------- benchmarks/erubi-rails/config/application.rb | 2 +- .../config/environments/production.rb | 1 - 4 files changed, 63 insertions(+), 60 deletions(-) diff --git a/benchmarks/erubi-rails/Gemfile b/benchmarks/erubi-rails/Gemfile index 603c17e0..43dde742 100644 --- a/benchmarks/erubi-rails/Gemfile +++ b/benchmarks/erubi-rails/Gemfile @@ -13,13 +13,13 @@ gem "cgi" # Workaround cgi extraction in Ruby 3.5.0-dev actiontext activejob activemodel activerecord activestorage activesupport railties ].each do |rails_gem| - gem rails_gem, '~> 7.2.1' + gem rails_gem, '~> 8.0' end gem 'sprockets-rails', '3.4.0' # Use sqlite3 as the database for Active Record -gem 'sqlite3', '~> 1.4', platform: :ruby +gem 'sqlite3', platform: :ruby gem 'activerecord-jdbcsqlite3-adapter', '~> 70', platform: :jruby # Use Puma as the app server # gem 'puma', '~> 5.6' diff --git a/benchmarks/erubi-rails/Gemfile.lock b/benchmarks/erubi-rails/Gemfile.lock index 19cf19f9..97f58f3e 100644 --- a/benchmarks/erubi-rails/Gemfile.lock +++ b/benchmarks/erubi-rails/Gemfile.lock @@ -1,60 +1,59 @@ GEM remote: https://rubygems.org/ specs: - actionmailbox (7.2.2.1) - actionpack (= 7.2.2.1) - activejob (= 7.2.2.1) - activerecord (= 7.2.2.1) - activestorage (= 7.2.2.1) - activesupport (= 7.2.2.1) + actionmailbox (8.0.2) + actionpack (= 8.0.2) + activejob (= 8.0.2) + activerecord (= 8.0.2) + activestorage (= 8.0.2) + activesupport (= 8.0.2) mail (>= 2.8.0) - actionmailer (7.2.2.1) - actionpack (= 7.2.2.1) - actionview (= 7.2.2.1) - activejob (= 7.2.2.1) - activesupport (= 7.2.2.1) + actionmailer (8.0.2) + actionpack (= 8.0.2) + actionview (= 8.0.2) + activejob (= 8.0.2) + activesupport (= 8.0.2) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.2.2.1) - actionview (= 7.2.2.1) - activesupport (= 7.2.2.1) + actionpack (8.0.2) + actionview (= 8.0.2) + activesupport (= 8.0.2) nokogiri (>= 1.8.5) - racc - rack (>= 2.2.4, < 3.2) + 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.2.1) - actionpack (= 7.2.2.1) - activerecord (= 7.2.2.1) - activestorage (= 7.2.2.1) - activesupport (= 7.2.2.1) + actiontext (8.0.2) + actionpack (= 8.0.2) + activerecord (= 8.0.2) + activestorage (= 8.0.2) + activesupport (= 8.0.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.2.2.1) - activesupport (= 7.2.2.1) + actionview (8.0.2) + activesupport (= 8.0.2) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.2.2.1) - activesupport (= 7.2.2.1) + activejob (8.0.2) + activesupport (= 8.0.2) globalid (>= 0.3.6) - activemodel (7.2.2.1) - activesupport (= 7.2.2.1) - activerecord (7.2.2.1) - activemodel (= 7.2.2.1) - activesupport (= 7.2.2.1) + activemodel (8.0.2) + activesupport (= 8.0.2) + activerecord (8.0.2) + activemodel (= 8.0.2) + activesupport (= 8.0.2) timeout (>= 0.4.0) - activestorage (7.2.2.1) - actionpack (= 7.2.2.1) - activejob (= 7.2.2.1) - activerecord (= 7.2.2.1) - activesupport (= 7.2.2.1) + activestorage (8.0.2) + actionpack (= 8.0.2) + activejob (= 8.0.2) + activerecord (= 8.0.2) + activesupport (= 8.0.2) marcel (~> 1.0) - activesupport (7.2.2.1) + activesupport (8.0.2) base64 benchmark (>= 0.3) bigdecimal @@ -66,6 +65,7 @@ GEM minitest (>= 5.1) securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) base64 (0.3.0) @@ -134,6 +134,8 @@ GEM nokogiri (1.18.9) mini_portile2 (~> 2.8.2) racc (~> 1.4) + nokogiri (1.18.9-x86_64-linux-gnu) + racc (~> 1.4) pp (0.6.2) prettyprint prettyprint (0.2.0) @@ -142,7 +144,7 @@ GEM stringio public_suffix (6.0.2) racc (1.8.1) - rack (3.1.16) + rack (3.2.0) rack-mini-profiler (2.3.4) rack (>= 1.2.0) rack-proxy (0.7.7) @@ -161,9 +163,9 @@ GEM rails-html-sanitizer (1.6.2) loofah (~> 2.21) 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.2.1) - actionpack (= 7.2.2.1) - activesupport (= 7.2.2.1) + railties (8.0.2) + actionpack (= 8.0.2) + activesupport (= 8.0.2) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -173,7 +175,7 @@ GEM rdoc (6.14.2) erb psych (>= 4.0.0) - regexp_parser (2.10.0) + regexp_parser (2.11.0) reline (0.6.2) io-console (~> 0.5) rexml (3.4.1) @@ -184,7 +186,7 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2) semantic_range (3.1.0) - spring (4.3.0) + spring (4.4.0) sprockets (4.2.2) concurrent-ruby (~> 1.0) logger @@ -193,8 +195,9 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - sqlite3 (1.7.3) + sqlite3 (2.7.3) mini_portile2 (~> 2.8.0) + sqlite3 (2.7.3-x86_64-linux-gnu) stringio (3.1.7) strscan (3.1.5) thor (1.4.0) @@ -204,6 +207,7 @@ GEM turbolinks-source (5.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) + uri (1.0.3) useragent (0.16.11) webdrivers (5.3.1) nokogiri (~> 1.6) @@ -223,17 +227,17 @@ PLATFORMS x86_64-linux DEPENDENCIES - actionmailbox (~> 7.2.1) - actionmailer (~> 7.2.1) - actionpack (~> 7.2.1) - actiontext (~> 7.2.1) - actionview (~> 7.2.1) - activejob (~> 7.2.1) - activemodel (~> 7.2.1) - activerecord (~> 7.2.1) + actionmailbox (~> 8.0) + actionmailer (~> 8.0) + actionpack (~> 8.0) + actiontext (~> 8.0) + actionview (~> 8.0) + activejob (~> 8.0) + activemodel (~> 8.0) + activerecord (~> 8.0) activerecord-jdbcsqlite3-adapter (~> 70) - activestorage (~> 7.2.1) - activesupport (~> 7.2.1) + activestorage (~> 8.0) + activesupport (~> 8.0) base64 bigdecimal byebug @@ -245,15 +249,15 @@ DEPENDENCIES net-pop (~> 0.1.1) net-smtp (~> 0.2.1) rack-mini-profiler (~> 2.0) - railties (~> 7.2.1) + railties (~> 8.0) selenium-webdriver spring sprockets-rails (= 3.4.0) - sqlite3 (~> 1.4) + sqlite3 turbolinks (~> 5) tzinfo-data webdrivers webpacker (~> 5.0) BUNDLED WITH - 2.8.0.dev + 2.7.0 diff --git a/benchmarks/erubi-rails/config/application.rb b/benchmarks/erubi-rails/config/application.rb index f5a5915b..01543d8f 100644 --- a/benchmarks/erubi-rails/config/application.rb +++ b/benchmarks/erubi-rails/config/application.rb @@ -21,7 +21,7 @@ module ErbTest class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 7.2 + config.load_defaults "#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}" # Please, add to the `ignore` list any other `lib` subdirectories that do # not contain `.rb` files, or that should not be reloaded or eager loaded. diff --git a/benchmarks/erubi-rails/config/environments/production.rb b/benchmarks/erubi-rails/config/environments/production.rb index d2ba2e56..8fbfa1ab 100644 --- a/benchmarks/erubi-rails/config/environments/production.rb +++ b/benchmarks/erubi-rails/config/environments/production.rb @@ -91,7 +91,6 @@ # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } # yjit-bench configurations - config.active_record.sqlite3_production_warning = false # If we want to benchmark with YJIT then it has already been enabled by command line arguments. # If we are benchmarking CRuby without YJIT don't enable it even if this build has it. config.yjit = false From a2d1a1629b32c5a45bc04cbe5f17732a680a01d7 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Fri, 8 Aug 2025 13:27:57 +0200 Subject: [PATCH 4/4] lobsters & shipit: Dynamically use latest Rails defaults. --- benchmarks/lobsters/config/application.rb | 2 +- benchmarks/shipit/config/application.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmarks/lobsters/config/application.rb b/benchmarks/lobsters/config/application.rb index 5498cfb0..59ead8af 100644 --- a/benchmarks/lobsters/config/application.rb +++ b/benchmarks/lobsters/config/application.rb @@ -21,7 +21,7 @@ module Lobsters class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 8.0 + config.load_defaults "#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}" # Please, add to the `ignore` list any other `lib` subdirectories that do # not contain `.rb` files, or that should not be reloaded or eager loaded. diff --git a/benchmarks/shipit/config/application.rb b/benchmarks/shipit/config/application.rb index fd49ce2f..4d3a0d0f 100644 --- a/benchmarks/shipit/config/application.rb +++ b/benchmarks/shipit/config/application.rb @@ -22,7 +22,7 @@ module Shipit class Application < Rails::Application Pubsubstub.use_persistent_connections = false # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 8.0 + config.load_defaults "#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}" config.active_job.queue_adapter = :test