f9c456bd0c
Previously, we called the `peek_enabled?` method like so: prepend_before_action :set_peek_request_id, if: :peek_enabled? Now we don't have a `set_peek_request_id` method, so we don't need that line. However, the `peek_enabled?` part had a side-effect: it would also populate the request store cache for whether the performance bar was enabled for the current request or not. This commit makes that side-effect explicit, and replaces all uses of `peek_enabled?` with the more explicit `Gitlab::PerformanceBar.enabled_for_request?`. There is one spec that still sets `SafeRequestStore[:peek_enabled]` directly, because it is contrasting behaviour with and without a request store enabled. The upshot is: 1. We still set the value in one place. We make it more explicit that that's what we're doing. 2. Reading that value uses a consistent method so it's easier to find in future. |
||
---|---|---|
.. | ||
admin | ||
boards | ||
ci | ||
clusters | ||
concerns | ||
dashboard | ||
explore | ||
google_api | ||
groups | ||
import | ||
instance_statistics | ||
ldap | ||
oauth | ||
profiles | ||
projects | ||
sherlock | ||
snippets | ||
users | ||
abuse_reports_controller.rb | ||
acme_challenges_controller.rb | ||
application_controller.rb | ||
autocomplete_controller.rb | ||
chaos_controller.rb | ||
confirmations_controller.rb | ||
dashboard_controller.rb | ||
graphql_controller.rb | ||
groups_controller.rb | ||
health_check_controller.rb | ||
health_controller.rb | ||
help_controller.rb | ||
ide_controller.rb | ||
invites_controller.rb | ||
jwt_controller.rb | ||
metrics_controller.rb | ||
notification_settings_controller.rb | ||
omniauth_callbacks_controller.rb | ||
passwords_controller.rb | ||
profiles_controller.rb | ||
projects_controller.rb | ||
registrations_controller.rb | ||
root_controller.rb | ||
search_controller.rb | ||
sent_notifications_controller.rb | ||
sessions_controller.rb | ||
snippets_controller.rb | ||
uploads_controller.rb | ||
user_callouts_controller.rb | ||
users_controller.rb |