Skip to content

Consolidate Puma low-level error handler code

Stan Hu requested to merge sh-consolidate-puma-error-handler into master

What does this MR do and why?

Previously the Puma low-level error handler was specified in three different places (Cloud Native GitLab, Omnibus GitLab, GitLab Development Kit). Any time a change was needed we would have to update three different files. We can simplify this by putting in a central class that each of the configuration files can use.

Relates to #426135 (closed)

How to set up and validate locally

  1. Check out this branch.
  2. In your GDK directory, checkout gitlab-development-kit!3373 (merged).
  3. Run bundle exec rake gitlab/config/puma.rb from the GDK directory.
  4. gdk restart rails-web
  5. Then attempt to submit an invalid URL to trigger the low-level handler:
$ curl -I 'http://gdk.test:3000/-/merge_requests?sort=created_date&state=<th:t=\"%24{dfb}%23foreach'
HTTP/1.1 400 Bad Request
Date: Mon, 25 Sep 2023 14:41:36 GMT

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Stan Hu

Merge request reports