summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAhmad Sherif <me@ahmadsherif.com>2016-08-01 14:23:41 +0200
committerAhmad Sherif <me@ahmadsherif.com>2016-08-01 14:26:11 +0200
commit2e06800bfdb1fa46602beffce6ea8fb282e8a29a (patch)
treea4f1700fdd92140a247a6076fe9b908ef87d16ca
parent8c6b85eca5e19ca676eaef156876614526176821 (diff)
downloadgitlab-ce-2e06800bfdb1fa46602beffce6ea8fb282e8a29a.tar.gz
Fix RequestProfiler::Middleware error when code is reloaded in developmentfix/request-profiler-middleware-error-on-reload
Closes #20452
-rw-r--r--CHANGELOG1
-rw-r--r--config/initializers/request_profiler.rb2
-rw-r--r--lib/gitlab/request_profiler/middleware.rb1
3 files changed, 4 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 387006eec4e..d25ff7da27f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -40,6 +40,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 hooks missing on imported GitLab projects
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