Extract Gitlab::SafeRequestStore gem
What does this MR do and why?
In this MR we extract Gitlab::SafeRequestStore
and related constants into a gem gems/gitlab-safe_request_store
.
We moved 3 constants inside the gem:
-
Gitlab::SafeRequestStore
(remaining the same) -
Gitlab::NullRequestStore
-->Gitlab::SafeRequestStore::NullStore
-
Gitlab::WithRequestStore
module -->Gitlab::SafeRequestStore.ensure_request_store
method
Possible follow-ups:
With this gem being extracted we should be using it instead of RequestStore
directly. There are currently 57
occurrences in the codebase where RequestStore
is used. After that, we may be able to remove request_store
gem from the main Rails Gemfile so that RequestStore
is only used through Gitlab::SafeRequestStore
proxy.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Fabio Pitino