Browse Source

[ruby/rack-sequel] Remove failing Unicorn variant (#9893)

Unicorn hasn't been updated for 4 years and seems unmaintained.
It is currently failing as well.
Petrik de Heus 3 months ago
parent
commit
f0fcd83ec8

+ 0 - 5
frameworks/Ruby/rack-sequel/Gemfile

@@ -16,8 +16,3 @@ end
 group :puma, optional: true do
   gem 'puma', '~> 6.5', require: false
 end
-
-group :unicorn, optional: true do
-  gem 'unicorn', '~> 6.1', platforms: [:ruby, :mswin], require: false
-  gem 'logger' # required by unicorn on Ruby 3.5
-end

+ 0 - 8
frameworks/Ruby/rack-sequel/Gemfile.lock

@@ -3,23 +3,17 @@ GEM
   specs:
     bigdecimal (3.1.9)
     json (2.11.3)
-    kgio (2.11.4)
-    logger (1.7.0)
     mysql2 (0.5.6)
     nio4r (2.7.4)
     pg (1.5.9)
     puma (6.6.0)
       nio4r (~> 2.0)
     rack (3.1.11)
-    raindrops (0.20.1)
     sequel (5.90.0)
       bigdecimal
     sequel_pg (1.17.1)
       pg (>= 0.18.0, != 1.2.0)
       sequel (>= 4.38.0)
-    unicorn (6.1.0)
-      kgio (~> 2.6)
-      raindrops (~> 0.7)
 
 PLATFORMS
   ruby
@@ -28,14 +22,12 @@ PLATFORMS
 
 DEPENDENCIES
   json (~> 2.8)
-  logger
   mysql2 (~> 0.4)
   pg (~> 1.5)
   puma (~> 6.5)
   rack (~> 3.0)
   sequel (~> 5.0)
   sequel_pg (~> 1.6)
-  unicorn (~> 6.1)
 
 BUNDLED WITH
    2.6.2

+ 1 - 3
frameworks/Ruby/rack-sequel/README.md

@@ -14,9 +14,7 @@ The tests will be run with:
 
 * [Ruby 3.4](http://www.ruby-lang.org)
 * [Puma 6](http://puma.io)
-* [Passenger 6](https://www.phusionpassenger.com)
-* [Unicorn 5](https://bogomips.org/unicorn/)
-* [Rack 2](http://rack.rubyforge.org)
+* [Rack 3](http://rack.rubyforge.org)
 * [Sequel 5](http://sequel.jeremyevans.net)
 * [MySQL 5.5](https://www.mysql.com)
 * [Postgres 9.3](https://www.postgresql.org)

+ 0 - 40
frameworks/Ruby/rack-sequel/benchmark_config.json

@@ -41,46 +41,6 @@
         "display_name": "rack-sequel-postgres-puma-mri",
         "versus": null,
         "notes": ""
-      },
-      "unicorn-mri": {
-        "db_url": "/db",
-        "query_url": "/queries?queries=",
-        "fortune_url": "/fortunes",
-        "update_url": "/updates?queries=",
-        "port": 8080,
-        "approach": "Realistic",
-        "classification": "Micro",
-        "database": "MySQL",
-        "framework": "rack",
-        "language": "Ruby",
-        "orm": "Micro",
-        "platform": "Rack",
-        "webserver": "Unicorn",
-        "os": "Linux",
-        "database_os": "Linux",
-        "display_name": "rack-sequel-unicorn-mri",
-        "versus": "rack-unicorn",
-        "notes": ""
-      },
-      "postgres-unicorn-mri": {
-        "db_url": "/db",
-        "query_url": "/queries?queries=",
-        "fortune_url": "/fortunes",
-        "update_url": "/updates?queries=",
-        "port": 8080,
-        "approach": "Realistic",
-        "classification": "Micro",
-        "database": "Postgres",
-        "framework": "rack",
-        "language": "Ruby",
-        "orm": "Micro",
-        "platform": "Rack",
-        "webserver": "Unicorn",
-        "os": "Linux",
-        "database_os": "Linux",
-        "display_name": "rack-sequel-postgres-unicorn-mri",
-        "versus": null,
-        "notes": ""
       }
     }
   ]

+ 4 - 9
frameworks/Ruby/rack-sequel/boot.rb

@@ -9,26 +9,21 @@ def connect(dbtype)
   Bundler.require(dbtype) # Load database-specific modules
 
   adapters = {
-    mysql: { jruby: 'jdbc:mysql', mri: 'mysql2' },
-    postgresql: { jruby: 'jdbc:postgresql', mri: 'postgres' }
+    mysql: 'mysql2',
+    postgresql: 'postgres'
   }
 
   opts = {}
 
   # Determine threading/thread pool size and timeout
-  if defined?(JRUBY_VERSION)
-    opts[:max_connections] = (2 * Math.log(Integer(ENV.fetch('MAX_CONCURRENCY')))).floor
-    opts[:pool_timeout] = 10
-  elsif defined?(Puma) && (threads = Puma.cli_config.options.fetch(:max_threads)) > 1
+  if defined?(Puma) && (threads = Puma.cli_config.options.fetch(:max_threads)) > 1
     opts[:max_connections] = (2 * Math.log(threads)).floor
     opts[:pool_timeout] = 10
-  else
-    Sequel.single_threaded = true
   end
 
   Sequel.connect \
     '%{adapter}://%{host}/%{database}?user=%{user}&password=%{password}' % {
-      adapter: adapters.fetch(dbtype).fetch(defined?(JRUBY_VERSION) ? :jruby : :mri),
+      adapter: (dbtype == :mysql ? 'mysql2' : 'postgresql'),
       host: 'tfb-database',
       database: 'hello_world',
       user: 'benchmarkdbuser',

+ 0 - 68
frameworks/Ruby/rack-sequel/config.toml

@@ -34,71 +34,3 @@ orm = "Micro"
 platform = "Rack"
 webserver = "Puma"
 versus = "rack-puma-mri"
-
-[postgres-passenger-mri]
-urls.plaintext = "/plaintext"
-urls.json = "/json"
-urls.db = "/db"
-urls.query = "/queries?queries="
-urls.update = "/updates?queries="
-urls.fortune = "/fortunes"
-approach = "Stripped"
-classification = "Micro"
-database = "Postgres"
-database_os = "Linux"
-os = "Linux"
-orm = "Micro"
-platform = "Rack"
-webserver = "Passenger"
-versus = "None"
-
-[postgres-unicorn-mri]
-urls.plaintext = "/plaintext"
-urls.json = "/json"
-urls.db = "/db"
-urls.query = "/queries?queries="
-urls.update = "/updates?queries="
-urls.fortune = "/fortunes"
-approach = "Stripped"
-classification = "Micro"
-database = "Postgres"
-database_os = "Linux"
-os = "Linux"
-orm = "Micro"
-platform = "Rack"
-webserver = "Unicorn"
-versus = "None"
-
-[passenger-mri]
-urls.plaintext = "/plaintext"
-urls.json = "/json"
-urls.db = "/db"
-urls.query = "/queries?queries="
-urls.update = "/updates?queries="
-urls.fortune = "/fortunes"
-approach = "Stripped"
-classification = "Micro"
-database = "MySQL"
-database_os = "Linux"
-os = "Linux"
-orm = "Micro"
-platform = "Rack"
-webserver = "Passenger"
-versus = "None"
-
-[unicorn-mri]
-urls.plaintext = "/plaintext"
-urls.json = "/json"
-urls.db = "/db"
-urls.query = "/queries?queries="
-urls.update = "/updates?queries="
-urls.fortune = "/fortunes"
-approach = "Stripped"
-classification = "Micro"
-database = "MySQL"
-database_os = "Linux"
-os = "Linux"
-orm = "Micro"
-platform = "Rack"
-webserver = "Unicorn"
-versus = "rack-unicorn"

+ 0 - 6
frameworks/Ruby/rack-sequel/config/mri_unicorn.rb

@@ -1,6 +0,0 @@
-require_relative 'auto_tune'
-
-# FWBM only...
-num_workers, = auto_tune
-
-worker_processes num_workers

+ 0 - 21
frameworks/Ruby/rack-sequel/rack-sequel-postgres-unicorn-mri.dockerfile

@@ -1,21 +0,0 @@
-FROM ruby:3.5-rc
-
-ADD ./ /rack-sequel
-
-WORKDIR /rack-sequel
-
-ENV RUBY_YJIT_ENABLE=1
-
-# Use Jemalloc
-RUN apt-get update && \
-    apt-get install -y --no-install-recommends libjemalloc2
-ENV LD_PRELOAD=libjemalloc.so.2
-
-RUN bundle config set with 'postgresql unicorn'
-RUN bundle install --jobs=4 --gemfile=/rack-sequel/Gemfile
-
-ENV DBTYPE=postgresql
-
-EXPOSE 8080
-
-CMD bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production

+ 0 - 21
frameworks/Ruby/rack-sequel/rack-sequel-unicorn-mri.dockerfile

@@ -1,21 +0,0 @@
-FROM ruby:3.5-rc
-
-ADD ./ /rack-sequel
-
-WORKDIR /rack-sequel
-
-ENV RUBY_YJIT_ENABLE=1
-
-# Use Jemalloc
-RUN apt-get update && \
-    apt-get install -y --no-install-recommends libjemalloc2
-ENV LD_PRELOAD=libjemalloc.so.2
-
-RUN bundle config set with 'mysql unicorn'
-RUN bundle install --jobs=4 --gemfile=/rack-sequel/Gemfile
-
-ENV DBTYPE=mysql
-
-EXPOSE 8080
-
-CMD bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production