Skip to content

Update puma & puma_worker_killer to upstream (5.1.1)

Aleksei Lipniagov requested to merge update-puma-to-v-5 into master

What does this MR do?

Drops custom forks of puma and puma_worker_killer.
Replaces them with latest upstream versions.

More at #290004 (closed)

Merge of these MRs will be coordinated - we'll merge Omnibus / CNG / GDK MRs first, then this one:

TODO

Puma 5 breaking changes highlights

Deprecations, Removals and Breaking API Changes: from the puma/puma changelog

Upgrade to 5.0 doc: https://github.com/puma/puma/blob/085750428c37feac497e3fc34bf75be86f79266f/5.0-Upgrade.md

Note: only 5.0 has breaking changes, there are no listed for 5.1: https://github.com/puma/puma/blob/master/History.md

Puma 5 breaking changes checklist

  • --control has been removed. Use --control-url
    We don't use it: https://github.com/puma/puma#controlstatus-server
  • worker_directory has been removed. Use directory.
    I didn't find that we use it
  • min_threads now set by environment variables PUMA_MIN_THREADS and MIN_THREADS.
    The description was not entirely clear, but according to the MR (https://github.com/puma/puma/pull/2143/files#diff-2dc4e3e83be7fd97cebc482ae07d6a8216944003de82458783fb00b5ae9524c8R181), this is an additional way to set this var, it doesn't replace the usage of min_threads (what we currently do)
  • max_threads now set by environment variables PUMA_MAX_THREADS and MAX_THREADS.
    Same as above ^
  • max_threads default to 5 in MRI or 16 for all other interpreters.
    From what I've seen, we set it explicitly, don't use defaults
  • preload_app! is on by default if number of workers > 1 and set via WEB_CONCURRENCY
    Shouldn't affect us, as we always preload
  • Puma::Plugin.workers_supported? has been removed. Use Puma.forkable? instead.
    I didn't find any usages of the mentioned method
  • tcp_mode has been removed without replacement.
    We don't use it.
  • Daemonization has been removed without replacement.
    For daemonization, please use a modern process management solution, such as systemd or monit. - we should use runit
  • Changed #connected_port to #connected_ports
    I didn't find we explicitly use it
  • Configuration: environment is read from RAILS_ENV, if RACK_ENV can't be found
    We set environment explicitly
  • Log binding on http:// for TCP bindings to make it clickable
    We don't use it.

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 Aleksei Lipniagov

Merge request reports