0876b46024
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 |
||
---|---|---|
.. | ||
backend | ||
badge | ||
bitbucket_import | ||
checks | ||
ci | ||
conflict | ||
data_builder | ||
database | ||
diff | ||
downtime_check | ||
fogbugz_import | ||
gfm | ||
git | ||
github_import | ||
gitlab_import | ||
google_code_import | ||
graphs | ||
import_export | ||
ldap | ||
metrics | ||
middleware | ||
o_auth | ||
saml | ||
sanitizers | ||
sherlock | ||
slash_commands | ||
sql | ||
template | ||
asciidoc_spec.rb | ||
auth_spec.rb | ||
award_emoji_spec.rb | ||
blame_spec.rb | ||
changes_list_spec.rb | ||
closing_issue_extractor_spec.rb | ||
color_schemes_spec.rb | ||
current_settings_spec.rb | ||
database_spec.rb | ||
downtime_check_spec.rb | ||
exclusive_lease_spec.rb | ||
git_access_spec.rb | ||
git_access_wiki_spec.rb | ||
git_spec.rb | ||
highlight_spec.rb | ||
identifier_spec.rb | ||
incoming_email_spec.rb | ||
key_fingerprint_spec.rb | ||
lazy_spec.rb | ||
lfs_token_spec.rb | ||
markup_helper_spec.rb | ||
metrics_spec.rb | ||
popen_spec.rb | ||
project_search_results_spec.rb | ||
redis_spec.rb | ||
reference_extractor_spec.rb | ||
regex_spec.rb | ||
search_results_spec.rb | ||
snippet_search_results_spec.rb | ||
themes_spec.rb | ||
upgrader_spec.rb | ||
uploads_transfer_spec.rb | ||
url_builder_spec.rb | ||
url_sanitizer_spec.rb | ||
user_access_spec.rb | ||
version_info_spec.rb | ||
workhorse_spec.rb |