diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-08-01 20:05:10 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-08-01 20:05:10 +0000 |
commit | 0819461e84d2652d66be070cb758c42b3d8d6858 (patch) | |
tree | 898da333394ce3f6ecd9d245edb9ffca4908a9b6 | |
parent | 61611ad24f6d800ab64fdb4f21125e3dfb2aada5 (diff) | |
parent | 2e06800bfdb1fa46602beffce6ea8fb282e8a29a (diff) | |
download | gitlab-ce-0819461e84d2652d66be070cb758c42b3d8d6858.tar.gz |
Merge branch 'fix/request-profiler-middleware-error-on-reload' into 'master'
Fix RequestProfiler::Middleware error when code is reloaded in development
## What does this MR do?
It explicitly requires `Gitlab::RequestProfiler::Middleware` before inserting it in the stack instead of autoloading it.
## Are there points in the code the reviewer needs to double check?
N/A
## Why was this MR needed?
It fixes #20452
## What are the relevant issue numbers?
#20452
## Screenshots (if relevant)
N/A
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- [ ] ~~API support added~~
- ~~Tests~~
- [ ] ~~Added for this feature/bug~~
- [ ] ~~All builds are passing~~
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
See merge request !5593
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | config/initializers/request_profiler.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/request_profiler/middleware.rb | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG index 7b5b70911ae..3b61e52b2fc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -43,6 +43,7 @@ v 8.11.0 (unreleased) - Change requests_profiles resource constraint to catch virtually any file - Reduce number of queries made for merge_requests/:id/diffs - Sensible state specific default sort order for issues and merge requests !5453 (tomb0y) + - Fix RequestProfiler::Middleware error when code is reloaded in development v 8.10.3 (unreleased) - Fix importer for GitHub Pull Requests when a branch was removed diff --git a/config/initializers/request_profiler.rb b/config/initializers/request_profiler.rb index fb5a7b8372e..a9aa802681a 100644 --- a/config/initializers/request_profiler.rb +++ b/config/initializers/request_profiler.rb @@ -1,3 +1,5 @@ +require 'gitlab/request_profiler/middleware' + Rails.application.configure do |config| config.middleware.use(Gitlab::RequestProfiler::Middleware) end diff --git a/lib/gitlab/request_profiler/middleware.rb b/lib/gitlab/request_profiler/middleware.rb index 8da8b754975..0c54f2dd71f 100644 --- a/lib/gitlab/request_profiler/middleware.rb +++ b/lib/gitlab/request_profiler/middleware.rb @@ -1,4 +1,5 @@ require 'ruby-prof' +require 'gitlab/request_profiler' module Gitlab module RequestProfiler |