Skip to content
Snippets Groups Projects
Commit 0720b9ce authored by Ahmad Sherif's avatar Ahmad Sherif
Browse files

Catch what warden might throw when profiling requests to re-throw it

Closes #20488
parent 0819461e
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -44,6 +44,7 @@ v 8.11.0 (unreleased)
- 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
- Catch what warden might throw when profiling requests to re-throw it
 
v 8.10.3 (unreleased)
- Fix importer for GitHub Pull Requests when a branch was removed
Loading
Loading
Loading
Loading
@@ -29,7 +29,9 @@ module Gitlab
def call_with_profiling(env)
ret = nil
result = RubyProf::Profile.profile do
ret = @app.call(env)
ret = catch(:warden) do
@app.call(env)
end
end
 
printer = RubyProf::CallStackPrinter.new(result)
Loading
Loading
@@ -41,7 +43,11 @@ module Gitlab
printer.print(file)
end
 
ret
if ret.is_a?(Array)
ret
else
throw(:warden, ret)
end
end
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment