guix_mirror_bot pushed a commit to branch master
in repository guix.
commit 16dd3c29971102efad5593a928b8b4bbb2d2ba0d
Author: Aaron Covrig <[email protected]>
AuthorDate: Wed Feb 25 23:49:21 2026 -0500
gnu: ruby-puma: Update to 7.2.0.
* gnu/packages/ruby-xyz.scm (ruby-puma): Update to 7.2.0.
[native-inputs]: Remove ruby-rack and ruby-rackup-1; add ruby-minitest,
ruby-minitest-mock, ruby-rackup, and ruby-rack-next.
[arguments]<#:phases>{use-rack-2}: Remove phase to enable using default
rack.
{increase-resource-limits}: Increase ulimit to 8192.
{check}: Increase test output verbosity.
{tune-test-environment}: New phase, change test timeouts and threading
{relax-test-case-timeout}: Remove phase.
{disable-problematic-tests}: Update list of problematic tests.
Change-Id: I41ad0898a1b6497433d3b730c822e9b8402afd22
Signed-off-by: Andreas Enge <[email protected]>
---
gnu/packages/ruby-xyz.scm | 102 +++++++++++++++++++++++-----------------------
1 file changed, 51 insertions(+), 51 deletions(-)
diff --git a/gnu/packages/ruby-xyz.scm b/gnu/packages/ruby-xyz.scm
index 0e11e0b5ff..218d408dec 100644
--- a/gnu/packages/ruby-xyz.scm
+++ b/gnu/packages/ruby-xyz.scm
@@ -11823,7 +11823,7 @@ part of the Prawn PDF generator.")
(define-public ruby-puma
(package
(name "ruby-puma")
- (version "7.0.3")
+ (version "7.2.0")
(source
(origin
(method git-fetch) ;for tests
@@ -11833,7 +11833,7 @@ part of the Prawn PDF generator.")
(file-name (git-file-name name version))
(sha256
(base32
- "07mnlf40yvr515f12vd091s46ljfhlcmpxykggim2162yjdwd402"))))
+ "0f94jb50a8j9gvn0l59s8dahhry2alwk825ybsxh2y4n1ckyp3n7"))))
(build-system ruby-build-system)
(arguments
(list
@@ -11847,24 +11847,21 @@ part of the Prawn PDF generator.")
(add-after 'unpack 'disable-rubocop
(lambda _
(setenv "PUMA_NO_RUBOCOP" "1")))
- (add-after 'unpack 'use-rack-2
- (lambda _
- (setenv "PUMA_CI_RACK" "rack2")
- (setenv "PUMA_CI_RACK_2" "1")))
(add-before 'build 'increase-resource-limits
(lambda _
;; The test suite requires a higher number of open files. Try
- ;; increasing the soft resource limit of max open files to 2048,
+ ;; increasing the soft resource limit of max open files to 8192,
;; or equal to the hard limit, whichever is lower.
+ ;; See:
https://github.com/puma/puma/blob/a59afabe782ec8869bb709ca991b32c0b2cc95fd/CONTRIBUTING.md#file-limits
(call-with-values (lambda () (getrlimit 'nofile))
(lambda (soft hard)
- (when (and soft (< soft 2048))
+ (when (and soft (< soft 8192))
(if hard
- (setrlimit 'nofile (min hard 2048) hard)
- (setrlimit 'nofile 2048 #f))
+ (setrlimit 'nofile (min hard 8192) hard)
+ (setrlimit 'nofile 8192 #f))
(format
#t "increased maximum number of open files from ~d to
~d~%"
- soft (if hard (min hard 2048) 2048)))))))
+ soft (if hard (min hard 8192) 8192)))))))
(add-before 'build 'fix-gemspec
(lambda _
(substitute* "puma.gemspec"
@@ -11874,6 +11871,9 @@ part of the Prawn PDF generator.")
(add-after 'install 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
+ ;; Increase our test verbosity
+ (setenv "PUMA_TEST_DEBUG" "1")
+ (setenv "TESTOPTS" "-v -vv")
(invoke "bundle" "exec" "rake" "test"))))
(add-after 'install 'delete-mkmf.log
(lambda _
@@ -11881,6 +11881,15 @@ part of the Prawn PDF generator.")
;; names (see:
;; https://github.com/rubygems/rubygems/issues/6259).
(for-each delete-file (find-files #$output "^mkmf\\.log$"))))
+ (add-before 'check 'tune-test-environment
+ (lambda _
+ ;; Disable minitest parallelization to reduce IO contention,
+ ;; especially since the tests are run without multiple workers
+ (setenv "MT_CPU" "0")
+ ;; The default value is 45 s and easily causes timeouts.
+ (setenv "TEST_CASE_TIMEOUT" "120")
+ ;; Give puma tests more time to respond before puma fails them
+ (setenv "RESP_READ_TIMEOUT" "30")))
(add-before 'check 'disable-problematic-tests
(lambda _
(let-syntax ((skip-tests
@@ -11889,49 +11898,38 @@ part of the Prawn PDF generator.")
(substitute* file
(((string-append "def " test ".*") all)
(string-append
- all " skip('fails on guix')\n")) ...)))))
+ all " skip('flaky test on guix')\n"))
...)))))
;; The test failures were reported at:
;; https://github.com/puma/puma/issues/3093, but appear to be
;; caused by the Guix build container, perhaps the lack of
;; zombie process reaping (see:
;; https://issues.guix.gnu.org/30948).
- ;; All the tests in the 'test_worker_gem_independence.rb'
- ;; module fail with "Expected false to be truthy.".
- (delete-file "test/test_worker_gem_independence.rb")
- (skip-tests "test/test_integration_ssl_session.rb"
- ;; The TLS 1.2 test fails for unknown reasons.
- "test_off_tls1_2")
- (skip-tests "test/test_integration_cluster.rb"
- "test_fork_worker_on_refork"
- "test_hot_restart_does_not_drop_connections"
- "test_culling_strategy_oldest_fork_worker"
- "test_usr1_fork_worker")
- (skip-tests "test/test_integration_pumactl.rb"
- "test_refork_cluster")
- ;; The Openssl certificate has expired, causing these tests to
fail.
- (skip-tests "test/test_puma_server_ssl.rb"
- "test_verify_fail_if_client_expired_cert"
- "test_verify_client_cert"
- "test_server_ssl_with_cert_pem_and_key_pem")
- (skip-tests "test/test_integration_ssl.rb"
- "test_ssl_run_with_curl_client")
- (skip-tests "test/test_web_concurrency_auto.rb" "\
-test_web_concurrency_with_concurrent_ruby_unavailable")
- (skip-tests "test/helpers/integration.rb"
- "test_puma_started_log_writing"
- "test_require_dependencies")
- ;; Errno::EMFILE: Too many open files - socket(2) for
- ;; "127.0.0.1" port 40785
- ;; Timeout waiting for server to log /PID: (\d+)\) booted in
- ;; [.0-9]+s, phase: 1/
- (skip-tests "test/test_integration_cluster.rb"
- "test_fork_worker_after_refork"
- "test_fork_worker_before_refork"
-
"test_refork_phased_restart_with_fork_worker_and_high_worker_count"))))
- (add-before 'check 'relax-test-case-timeout
- (lambda _
- ;; The default value is 45 s and easily causes timeouts.
- (setenv "TEST_CASE_TIMEOUT" "600")))
+ ;; Many of these tests seem to only fail on the 'cli' portion
+ ;; due to something causing them to hang indefinately
+ (skip-tests "test/test_plugin.rb"
+ "test_plugin")
+ (skip-tests "test/test_plugin_systemd.rb"
+ "test_plugin_systemd"
+ "test_systemd_watchdog"
+ "test_systemd_notify"
+
"test_refork_phased_restart_with_fork_worker_and_high_worker_count")
+ (skip-tests "test/test_pumactl.rb"
+ "test_control_url_and_status"
+ "test_control_ssl_ipv6"
+ "test_control_ssl_ipv4")
+ ;; Disabling the test/*_integration_* tests as they contain
many flaky tests
+ (delete-file "test/test_integration_cluster.rb")
+ (delete-file "test/test_integration_pumactl.rb")
+ (delete-file "test/test_integration_single.rb")
+ (delete-file "test/test_integration_ssl.rb")
+ (delete-file "test/test_integration_ssl_session.rb")
+ ;; Other files containing many problematic tests
+ (delete-file "test/test_cli.rb")
+ ;; All the tests in the 'test_worker_gem_independence.rb'
+ ;; module fail with "Expected false to be truthy.".
+ ;; tests try changing different module versions, but guix
+ ;; doesn't expose alternate module versions to be tested with
+ (delete-file "test/test_worker_gem_independence.rb"))))
(add-before 'check 'set-home
(lambda _
;; Some tests fail if the cannot write to HOME.
@@ -11950,11 +11948,13 @@
test_web_concurrency_with_concurrent_ruby_unavailable")
ruby-json
ruby-localhost
ruby-m
+ ruby-minitest
+ ruby-minitest-mock
ruby-minitest-proveit
ruby-minitest-retry
ruby-minitest-stub-const
- ruby-rack
- ruby-rackup-1
+ ruby-rackup
+ ruby-rack-next
ruby-rake-compiler
ruby-webrick))
(inputs