Advanced Search: Create feature flags to disable some tabs

Dmitry Gruzd requested to merge 338902-add-global-tabs-feature-flags into master

What does this MR do?

This MR introduces feature flags to gradually control which tabs are accessible for global searches (across entire GitLab instance). Since these searches hit every shard on our Elasticsearch cluster, we need a way to disable these tabs if our cluster becomes overloaded.

Feature flags:

  • global_search_code_tab
  • global_search_commits_tab
  • global_search_issues_tab
  • global_search_merge_requests_tab
  • global_search_wiki_tab

They're enabled by default, so this MR wouldn't impact customers.

#338902 (closed)

Screenshots or Screencasts (strongly suggested)

How to setup and validate locally (strongly suggested)

  1. Open http://localhost:3000/search?repository_ref=&scope=projects&search=gitlab
  2. Disable the chosen feature flag, for example:
  3. After the feature flag cache expires, the respective tab should disappear from the search page

Does this MR meet the acceptance criteria?


Availability and Testing


Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team

Related to #338902 (closed)

Edited by Dmitry Gruzd

Merge request reports