BigW Consortium Gitlab
Memoize Github::Shell's secret token ## What does this MR do? `API::Helpers#secret_token` was reading the secret file on every invocation. This MR reads the file in the `gitlab_shell_secret_token.rb` initializer and saves it as a class variable at `Gitlab::Shell.secret_token` ## Are there points in the code the reviewer needs to double check? - I'm not sure if the use of `cattr_accessor` is the best approach, or if should be moved into the `class << self` block? - Should `API::Helpers#secret_token` be removed in favor of using `Gitlab::Shell.secret_token`? ## Why was this MR needed? Performance optimization. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/22510 See merge request !6599
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
environments | Loading commit data... | |
initializers | Loading commit data... | |
locales | Loading commit data... | |
routes | Loading commit data... | |
application.rb | Loading commit data... | |
aws.yml.example | Loading commit data... | |
boot.rb | Loading commit data... | |
database.yml.env | Loading commit data... | |
database.yml.mysql | Loading commit data... | |
database.yml.postgresql | Loading commit data... | |
dependency_decisions.yml | Loading commit data... | |
environment.rb | Loading commit data... | |
gitlab.yml.example | Loading commit data... | |
license_finder.yml | Loading commit data... | |
mail_room.yml | Loading commit data... | |
newrelic.yml | Loading commit data... | |
resque.yml.example | Loading commit data... | |
routes.rb | Loading commit data... | |
secrets.yml.example | Loading commit data... | |
sidekiq.yml.example | Loading commit data... | |
unicorn.rb.example | Loading commit data... | |
unicorn.rb.example.development | Loading commit data... |