From b16b008f9d65a04fcfffde60f3fad09aef1caf0f Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 22:06:46 +0000 Subject: [PATCH 1/4] Update all of rails to version 8.0.5 --- Gemfile.lock | 157 +++++++++++++++++++++++++++------------------------ 1 file changed, 82 insertions(+), 75 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4f00de5a..51b734a3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,29 +9,29 @@ GEM remote: https://rubygems.org/ specs: 3scale-api (1.4.0) - actioncable (8.0.2.1) - actionpack (= 8.0.2.1) - activesupport (= 8.0.2.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 (8.0.2.1) - actionpack (= 8.0.2.1) - activejob (= 8.0.2.1) - activerecord (= 8.0.2.1) - activestorage (= 8.0.2.1) - activesupport (= 8.0.2.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 (8.0.2.1) - actionpack (= 8.0.2.1) - actionview (= 8.0.2.1) - activejob (= 8.0.2.1) - activesupport (= 8.0.2.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 (8.0.2.1) - actionview (= 8.0.2.1) - activesupport (= 8.0.2.1) + actionpack (8.0.5) + actionview (= 8.0.5) + activesupport (= 8.0.5) nokogiri (>= 1.8.5) rack (>= 2.2.4) rack-session (>= 1.0.1) @@ -39,35 +39,35 @@ GEM rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (8.0.2.1) - actionpack (= 8.0.2.1) - activerecord (= 8.0.2.1) - activestorage (= 8.0.2.1) - activesupport (= 8.0.2.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 (8.0.2.1) - activesupport (= 8.0.2.1) + actionview (8.0.5) + activesupport (= 8.0.5) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (8.0.2.1) - activesupport (= 8.0.2.1) + activejob (8.0.5) + activesupport (= 8.0.5) globalid (>= 0.3.6) - activemodel (8.0.2.1) - activesupport (= 8.0.2.1) - activerecord (8.0.2.1) - activemodel (= 8.0.2.1) - activesupport (= 8.0.2.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 (8.0.2.1) - actionpack (= 8.0.2.1) - activejob (= 8.0.2.1) - activerecord (= 8.0.2.1) - activesupport (= 8.0.2.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 (8.0.2.1) + activesupport (8.0.5) base64 benchmark (>= 0.3) bigdecimal @@ -134,7 +134,7 @@ GEM dry-inflector (~> 1.0) dry-logic (~> 1.4) zeitwerk (~> 2.6) - erb (6.0.1) + erb (6.0.2) erubi (1.13.1) excon (0.112.0) faraday (2.14.1) @@ -155,8 +155,9 @@ GEM ice_nine (0.11.2) interception (0.5) io-console (0.8.2) - irb (1.16.0) + irb (1.17.0) pp (>= 0.6.0) + prism (>= 1.3.0) rdoc (>= 4.0.0) reline (>= 0.4.2) json (2.19.2) @@ -204,7 +205,9 @@ GEM method_source (1.1.0) mini_mime (1.1.5) mini_portile2 (2.8.9) - minitest (5.26.2) + minitest (6.0.2) + drb (~> 2.0) + prism (~> 1.5) minitest-reporters (1.4.3) ansi builder @@ -214,12 +217,12 @@ GEM msgpack (1.7.1) multi_json (1.18.0) multi_xml (0.6.0) - mustermann (2.0.2) + mustermann (3.0.4) ruby2_keywords (~> 0.0.1) mutex_m (0.3.0) net-http (0.9.1) uri (>= 0.11.1) - net-imap (0.6.2) + net-imap (0.6.3) date net-protocol net-pop (0.1.2) @@ -229,7 +232,7 @@ GEM net-smtp (0.5.1) net-protocol nio4r (2.7.5) - nokogiri (1.19.1) + nokogiri (1.19.2) mini_portile2 (~> 2.8.2) racc (~> 1.4) oauth2 (2.0.18) @@ -276,40 +279,42 @@ GEM que (>= 1) sinatra racc (1.8.1) - rack (2.2.22) - rack-protection (2.2.3) - rack - rack-session (1.0.2) - rack (< 3) + rack (3.2.5) + rack-protection (4.2.1) + base64 (>= 0.1.0) + logger (>= 1.6.0) + rack (>= 3.0.0, < 4) + rack-session (2.1.1) + base64 (>= 0.1.0) + rack (>= 3.0.0) rack-test (2.2.0) rack (>= 1.3) - rackup (1.0.1) - rack (< 3) - webrick - rails (8.0.2.1) - actioncable (= 8.0.2.1) - actionmailbox (= 8.0.2.1) - actionmailer (= 8.0.2.1) - actionpack (= 8.0.2.1) - actiontext (= 8.0.2.1) - actionview (= 8.0.2.1) - activejob (= 8.0.2.1) - activemodel (= 8.0.2.1) - activerecord (= 8.0.2.1) - activestorage (= 8.0.2.1) - activesupport (= 8.0.2.1) + rackup (2.3.1) + rack (>= 3) + 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 (= 8.0.2.1) + railties (= 8.0.5) rails-dom-testing (2.3.0) activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.2) - loofah (~> 2.21) + 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 (8.0.2.1) - actionpack (= 8.0.2.1) - activesupport (= 8.0.2.1) + railties (8.0.5) + actionpack (= 8.0.5) + activesupport (= 8.0.5) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -318,7 +323,7 @@ GEM zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.3.1) - rdoc (7.1.0) + rdoc (7.2.0) erb psych (>= 4.0.0) tsort @@ -367,10 +372,12 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.2) - sinatra (2.2.3) - mustermann (~> 2.0) - rack (~> 2.2) - rack-protection (= 2.2.3) + sinatra (4.2.1) + logger (>= 1.6.0) + mustermann (~> 3.0) + rack (>= 3.0.0, < 4) + rack-protection (= 4.2.1) + rack-session (>= 2.0.0, < 3) tilt (~> 2.0) snaky_hash (2.0.3) hashie (>= 0.1.0, < 6) @@ -378,7 +385,7 @@ GEM stringio (3.2.0) thor (1.5.0) tilt (2.0.11) - timeout (0.6.0) + timeout (0.6.1) tomlrb (2.0.3) tsort (0.2.0) tzinfo (2.0.6) From a60533215769300549993e12a5082ea8542a705a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Lled=C3=B3?= Date: Tue, 31 Mar 2026 12:56:28 +0200 Subject: [PATCH 2/4] Upgrade to puma 6 --- Gemfile | 2 +- Gemfile.lock | 4 ++-- lib/puma/plugin/yabeda_prometheus.rb | 7 +++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Gemfile b/Gemfile index b2af28e2..979920b3 100644 --- a/Gemfile +++ b/Gemfile @@ -14,7 +14,7 @@ gem 'zeitwerk', '~> 2.6.18' # keep zeitwerk 2.6 until Ruby is 3.2 or higher gem 'pg', '~> 1.6.2' # Use Puma as the app server -gem 'puma', '~> 5.2' +gem 'puma', '~> 6' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder # gem 'jbuilder', '~> 2.5' diff --git a/Gemfile.lock b/Gemfile.lock index 51b734a3..6e5a40e7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -272,7 +272,7 @@ GEM date stringio public_suffix (4.0.6) - puma (5.6.9) + puma (6.6.1) nio4r (~> 2.0) que (2.4.1) que-web (0.10.0) @@ -454,7 +454,7 @@ DEPENDENCIES pry-rails pry-rescue pry-stack_explorer - puma (~> 5.2) + puma (~> 6) que (~> 2.4.1) que-web rails (~> 8.0.2) diff --git a/lib/puma/plugin/yabeda_prometheus.rb b/lib/puma/plugin/yabeda_prometheus.rb index 27100848..2cac8ad6 100644 --- a/lib/puma/plugin/yabeda_prometheus.rb +++ b/lib/puma/plugin/yabeda_prometheus.rb @@ -6,17 +6,16 @@ def start(launcher) options = launcher.options events = launcher.events + logger = launcher.log_writer host = options[:prometheus_host] || ENV['PROMETHEUS_EXPORTER_BIND'] || '0.0.0.0' port = options[:prometheus_port] || ENV['PROMETHEUS_EXPORTER_PORT'] || 9393 app = Yabeda::Prometheus::Exporter.rack_app - metrics = Puma::Server.new app, events - metrics.min_threads = 0 - metrics.max_threads = 1 + metrics = Puma::Server.new app, events, min_threads: 0, max_threads: 1 - events.log "* Starting metrics server on #{host}:#{port}" + logger.log "* Starting metrics server on #{host}:#{port}" metrics.add_tcp_listener host, port events.register(:state) do |state| From 399690eb4caa89a5dcf2507f42c0f12ad30b0b88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Lled=C3=B3?= Date: Tue, 31 Mar 2026 12:56:46 +0200 Subject: [PATCH 3/4] Install minitest-mock It's now a separated dependency --- Gemfile | 1 + Gemfile.lock | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Gemfile b/Gemfile index 979920b3..1329d4fc 100644 --- a/Gemfile +++ b/Gemfile @@ -75,6 +75,7 @@ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] group :test do gem 'minitest-reporters' gem 'minitest-stub-const' + gem "minitest-mock", "~> 5.27" gem 'webmock' gem 'codecov', require: false gem 'simplecov', '~> 0.21.2', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 6e5a40e7..ad7a2b80 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -208,6 +208,7 @@ GEM minitest (6.0.2) drb (~> 2.0) prism (~> 1.5) + minitest-mock (5.27.0) minitest-reporters (1.4.3) ansi builder @@ -444,6 +445,7 @@ DEPENDENCIES license_finder (~> 7.0.1) lograge message_bus + minitest-mock (~> 5.27) minitest-reporters minitest-stub-const mutex_m (~> 0.3.0) From b70cc51ccaec04e8010554c86712a558d6774cb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Lled=C3=B3?= Date: Tue, 31 Mar 2026 17:00:25 +0200 Subject: [PATCH 4/4] Update yabeda and prometheus client --- Gemfile | 4 ++-- Gemfile.lock | 19 ++++++++++++------- lib/prometheus/que_stats.rb | 1 - 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Gemfile b/Gemfile index 1329d4fc..c5de281e 100644 --- a/Gemfile +++ b/Gemfile @@ -47,9 +47,9 @@ gem 'message_bus' # for publishing notifications about integration status gem 'validate_url' -gem 'prometheus-client', '~> 2.1.0', require: %w[prometheus/client] +gem 'prometheus-client', '~> 4' gem 'yabeda-rails' -gem 'yabeda-prometheus', '~> 0.6.1' +gem 'yabeda-prometheus', '~> 0.9' gem 'yabeda-puma-plugin' # Dependency for yabeda-prometheus diff --git a/Gemfile.lock b/Gemfile.lock index ad7a2b80..5e2e173f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -83,6 +83,8 @@ GEM addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) ansi (1.5.0) + anyway_config (2.8.0) + ruby-next-core (~> 1.0) ast (2.4.3) base64 (0.3.0) benchmark (0.5.0) @@ -254,7 +256,8 @@ GEM prettyprint prettyprint (0.2.0) prism (1.6.0) - prometheus-client (2.1.0) + prometheus-client (4.2.5) + base64 pry (0.15.2) coderay (~> 1.1) method_source (~> 1.0) @@ -363,6 +366,7 @@ GEM rack (>= 1.1) rubocop (>= 1.75.0, < 2.0) rubocop-ast (>= 1.44.0, < 2.0) + ruby-next-core (1.2.0) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) rubyzip (2.3.2) @@ -412,13 +416,14 @@ GEM with_env (1.1.0) xml-simple (1.1.9) rexml - yabeda (0.8.0) + yabeda (0.16.0) + anyway_config (>= 1.0, < 3) concurrent-ruby dry-initializer - yabeda-prometheus (0.6.1) - prometheus-client (>= 0.10, < 3.0) + yabeda-prometheus (0.9.1) + prometheus-client (>= 3.0, < 5.0) rack - yabeda (~> 0.5) + yabeda (~> 0.10) yabeda-puma-plugin (0.6.0) json puma @@ -451,7 +456,7 @@ DEPENDENCIES mutex_m (~> 0.3.0) oauth2 pg (~> 1.6.2) - prometheus-client (~> 2.1.0) + prometheus-client (~> 4) pry-byebug pry-rails pry-rescue @@ -469,7 +474,7 @@ DEPENDENCIES validate_url webmock webrick - yabeda-prometheus (~> 0.6.1) + yabeda-prometheus (~> 0.9) yabeda-puma-plugin yabeda-rails zeitwerk (~> 2.6.18) diff --git a/lib/prometheus/que_stats.rb b/lib/prometheus/que_stats.rb index ce707fdd..045877a9 100644 --- a/lib/prometheus/que_stats.rb +++ b/lib/prometheus/que_stats.rb @@ -1,5 +1,4 @@ # frozen_string_literal: true -require 'prometheus/client/metric' require 'que/active_record/model' module Prometheus