Skip to content

Update Puma to v4.3.0

Kamil Trzciński requested to merge update-puma-to-4 into master

What does this MR do?

We should update Puma to latest release to stay as close to upstream till we do not run that in production on full-throttle.

Changeset between v3.12.0 and v4.3.0:

A list of changed files:

 .codeclimate.yml                                 |   2 +
 .gitattributes                                   |   3 +
 .github/ISSUE_TEMPLATE/bug_report.md             |  48 +++++
 .github/ISSUE_TEMPLATE/feature_request.md        |  20 ++
 .github/issue_template.md                        |  21 ---
 .github/pull_request_template.md                 |  14 ++
 .github/workflows/check_changelog.yml            |  13 ++
 .github/workflows/ruby.yml                       |  71 +++++++
 .gitignore                                       |   9 +
 .rubocop.yml                                     |  40 +---
 .travis.yml                                      |  74 ++++++--
 CODE_OF_CONDUCT.md                               |  77 ++++++++
 CONTRIBUTING.md                                  | 149 +++++++++++++++
 Gemfile                                          |   8 +-
 History.md                                       | 135 ++++++++++++++
 README.md                                        | 124 ++++++++-----
 Rakefile                                         |  27 +--
 appveyor.yml                                     | 109 -----------
 benchmarks/wrk/big_body.sh                       |   8 +
 benchmarks/wrk/big_response.sh                   |   6 +
 benchmarks/wrk/hello.sh                          |   8 +
 benchmarks/wrk/lua/big_body.lua                  |   3 +
 benchmarks/wrk/more_conns_than_threads.sh        |   6 +
 docs/architecture.md                             |   1 +
 docs/deployment.md                               |  28 ++-
 docs/plugins.md                                  |  30 ++-
 docs/restart.md                                  |   6 +-
 docs/systemd.md                                  |  36 +++-
 docs/tcp_mode.md                                 |  96 ++++++++++
 examples/config.rb                               | 200 --------------------
 examples/plugins/redis_stop_puma.rb              |   2 +-
 ext/puma_http11/PumaHttp11Service.java           |   2 +
 ext/puma_http11/extconf.rb                       |  13 ++
 ext/puma_http11/http11_parser.c                  |  99 ++++------
 ext/puma_http11/http11_parser.java.rl            |  58 +++---
 ext/puma_http11/http11_parser_common.rl          |   6 +-
 ext/puma_http11/mini_ssl.c                       |  90 ++++++++-
 ext/puma_http11/org/jruby/puma/Http11.java       | 220 +++++++++++-----------
 ext/puma_http11/org/jruby/puma/Http11Parser.java | 197 +++++++++-----------
 ext/puma_http11/org/jruby/puma/IOBuffer.java     |  72 +++++++
 ext/puma_http11/org/jruby/puma/MiniSSL.java      |  19 +-
 ext/puma_http11/puma_http11.c                    |   2 +
 lib/puma.rb                                      |   8 +
 lib/puma/accept_nonblock.rb                      |   8 +-
 lib/puma/app/status.rb                           |  64 ++++---
 lib/puma/binder.rb                               | 115 +++++-------
 lib/puma/cli.rb                                  |   6 +
 lib/puma/client.rb                               | 421 +++++++++++++++++++++--------------------
 lib/puma/cluster.rb                              |  85 ++++++---
 lib/puma/commonlogger.rb                         |   2 +
 lib/puma/compat.rb                               |  14 --
 lib/puma/configuration.rb                        |   9 +-
 lib/puma/const.rb                                |  42 +++--
 lib/puma/control_cli.rb                          |  55 ++++--
 lib/puma/convenient.rb                           |  23 ---
 lib/puma/daemon_ext.rb                           |  31 ----
 lib/puma/delegation.rb                           |  11 --
 lib/puma/detect.rb                               |   2 +
 lib/puma/dsl.rb                                  | 388 ++++++++++++++++++++++++++++++--------
 lib/puma/events.rb                               |   7 +-
 lib/puma/io_buffer.rb                            |   9 +-
 lib/puma/java_io_buffer.rb                       |  45 -----
 lib/puma/jruby_restart.rb                        |   2 +
 lib/puma/launcher.rb                             | 154 +++++++++------
 lib/puma/minissl.rb                              |  54 ++++--
 lib/puma/minissl/context_builder.rb              |  76 ++++++++
 lib/puma/null_io.rb                              |   2 +
 lib/puma/plugin.rb                               |   9 +-
 lib/puma/plugin/tmp_restart.rb                   |   2 +
 lib/puma/rack/backports/uri/common_193.rb        |  33 ----
 lib/puma/rack/builder.rb                         |   5 +-
 lib/puma/rack/urlmap.rb                          |   2 +
 lib/puma/rack_default.rb                         |   2 +
 lib/puma/reactor.rb                              | 169 +++++++++++------
 lib/puma/runner.rb                               |  16 +-
 lib/puma/server.rb                               | 107 ++++++-----
 lib/puma/single.rb                               |   8 +-
 lib/puma/state_file.rb                           |   2 +
 lib/puma/tcp_logger.rb                           |   2 +
 lib/puma/thread_pool.rb                          |  50 ++---
 lib/puma/util.rb                                 |   8 +-
 lib/rack/handler/puma.rb                         |   9 +-
 puma.gemspec                                     |   4 +-
 test/config/control_no_token.rb                  |   5 +
 test/config/custom_log_formatter.rb              |   3 +
 test/config/plugin.rb                            |   1 -
 test/config/plugin1.rb                           |   1 +
 test/config/prune_bundler_with_deps.rb           |   2 +
 test/config/simple.rb                            |   2 -
 test/config/ssl_config.rb                        |  11 +-
 test/config/suppress_exception.rb                |   1 +
 test/config/worker_shutdown_timeout_2.rb         |   1 +
 test/helper.rb                                   |  98 ++++++++--
 test/helpers/apps.rb                             |  12 ++
 test/helpers/config_file.rb                      |  16 ++
 test/helpers/integration.rb                      | 120 ++++++++++++
 test/helpers/ssl.rb                              |  13 ++
 test/rackup/{hello-delay.ru => big_response.ru}  |   4 +-
 test/rackup/hello-last-load-path.ru              |   3 +
 test/rackup/hello-map.ru                         |   3 -
 test/rackup/hello-post.ru                        |   4 -
 test/rackup/hello-stuck.ru                       |   1 -
 test/rackup/hello-tcp.ru                         |   5 -
 test/rackup/hijack.ru                            |   6 -
 test/rackup/hijack2.ru                           |   5 -
 test/rackup/sleep.ru                             |   9 +
 test/rackup/sleep_pid.ru                         |   8 +
 test/rackup/sleep_step.ru                        |  10 +
 test/rackup/slow.ru                              |   4 -
 test/shell/t2.rb                                 |   4 +-
 test/test_app_status.rb                          |  14 +-
 test/test_binder.rb                              | 178 +++++++++++++++---
 test/test_cli.rb                                 | 218 ++++++++++++++++------
 test/test_config.rb                              | 162 +++++++++++-----
 test/test_events.rb                              |  21 +++
 test/test_http11.rb                              |  25 +++
 test/test_integration.rb                         | 258 -------------------------
 test/test_integration_cluster.rb                 | 357 +++++++++++++++++++++++++++++++++++
 test/test_integration_pumactl.rb                 | 110 +++++++++++
 test/test_integration_single.rb                  | 104 +++++++++++
 test/test_launcher.rb                            |  91 +++++++++
 test/test_null_io.rb                             |   8 +-
 test/test_persistent.rb                          |  26 +--
 test/test_plugin.rb                              |  39 ++++
 test/test_puma_server.rb                         | 630 ++++++++++++++++++++++++++++++++++----------------------------
 test/test_puma_server_ssl.rb                     | 140 +++++++++++---
 test/test_pumactl.rb                             | 144 ++++++++++++--
 test/test_rack_handler.rb                        |  49 ++++-
 test/test_rack_server.rb                         |  25 +--
 test/test_thread_pool.rb                         | 103 +++++-----
 test/test_unix_socket.rb                         |  44 +++--
 test/test_web_server.rb                          |  80 +++++---
 tools/docker/Dockerfile                          |  16 ++
 tools/jungle/init.d/puma                         |  12 +-
 tools/trickletest.rb                             |   1 -
 win_gem_test/Rakefile_wintest                    |  11 ++
 win_gem_test/package_gem.rb                      |  21 +++
 win_gem_test/puma.ps1                            |  67 +++++++
 138 files changed, 4961 insertions(+), 2558 deletions(-)

Resolves #36966 (closed)

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖

Merge request reports