[FF] work_items_search_term_es_integration -- route work item search terms to Elasticsearch

Summary

Roll out the feature currently behind the work_items_search_term_es_integration feature flag.

  • DRI: @sdungarwal
  • Team Slack channel: #g_analytics_platform_insights

Note

Process and guidance live in the docs — this issue is just the commands and a place to track the rollout. "Rolling out" means incrementally enabling the flag on GitLab.com to validate stability — it is not the same as releasing the feature, which happens when the flag is removed. Feature flag controls · Feature flag lifecycle

What could go wrong?

Enabling this flag moves work item queries that carry a free-text search term from the Postgres finder to Elasticsearch, via Search::AdvancedFinders::WorkItemsFinder. No data is written either way, so there is no data-loss risk — the risk is changed results and added Elasticsearch load.

  • Blast radius. Every GLQL query with a search term, plus the work items list path, on any instance with advanced search enabled. Reaching the finder is already gated by glql_es_integration (ops, default on), so this flag is the only thing holding the switch back.
  • Changed results, not just changed performance. Elasticsearch searches iid^50 title^2 description and treats #1234 as an exact iid lookup; Postgres searches title and description only. Elasticsearch also routes any term matching Search::Elastic::Queries::ADVANCED_QUERY_SYNTAX_REGEX to simple_query_string, so memory -leak excludes leak while Postgres treats it literally. Users will see different result sets, not merely different ordering.
  • Watch. Elasticsearch query volume and latency on the search dashboards, plus the GLQL API error rate — a malformed simple_query_string term surfaces as a query failure rather than an empty result.
  • Rollback is clean. Turning the flag off restores the Postgres path immediately; nothing persists between the two.

Events

Feature Flag events are only logged by default for feature flags marked for the current or future milestones. To enable while the feature flag is active, see https://docs.gitlab.com/development/feature_flags/#logging

Rollout

Run all production /chatops in #production and cross-post the results to #g_analytics_platform_insights. Background: incremental rollout process, feature actors.

Non-production

/chatops gitlab run feature set work_items_search_term_es_integration 50 --actors --dev --pre --staging --staging-ref
/chatops gitlab run feature set work_items_search_term_es_integration true --dev --pre --staging --staging-ref

Production — percentage rollout (wait ≥15 min between steps, watch dashboards):

/chatops gitlab run feature set work_items_search_term_es_integration <percentage> --actors

Or target specific actors instead:

/chatops gitlab run feature set --project=gitlab-org/gitlab,gitlab-org/gitlab-foss work_items_search_term_es_integration true
/chatops gitlab run feature set --group=gitlab-org,gitlab-com work_items_search_term_es_integration true
/chatops gitlab run feature set --user=sdungarwal work_items_search_term_es_integration true

Before global rollout

Confirm the relevant gotchas before going to 100% — see enabling a feature for GitLab.com:

Cleanup

Remove the flag once deemed stable — see cleaning up. Track it here, or open a follow-up Feature Flag Cleanup issue. Remove the flag and its YAML definition from the codebase, then:

/chatops gitlab run release check <merge-request-url> <milestone>
/chatops gitlab run feature delete work_items_search_term_es_integration --dev --pre --staging --staging-ref --production

Rollback

/chatops gitlab run feature set work_items_search_term_es_integration false                                         # production
/chatops gitlab run feature set work_items_search_term_es_integration false --dev --pre --staging --staging-ref     # non-production
/chatops gitlab run feature delete work_items_search_term_es_integration --dev --pre --staging --staging-ref --production  # remove entirely