[FF] group_children_advanced_finder -- route group tree, dashboard and explore listings through Namespaces::GroupsFinder

Summary

Roll out the feature currently behind the group_children_advanced_finder feature flag.

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

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?

This flag changes the PostgreSQL query before it opens the Elasticsearch path, so the first thing to watch is query plans, not search results.

  • GroupDescendantsFinder#descendant_groups swaps parent.descendants + by_visible_to_users for Namespaces::GroupsFinder(parent:, include_parent_descendants: true, all_available: true). Groups::ChildrenController#index measures at roughly 216 database-hours per week, so a worse plan is expensive immediately.
  • The dashboard and explore listings move the filter term into the finder instead of searching the relation afterwards.
  • Blast radius is the group tree, /dashboard/groups and /explore/groups. No writes, no data loss — a bad rollout degrades latency and can return wrong result sets.

Elasticsearch stays off regardless until backfill_active_on_groups finishes, because expressible_active? declines until then.

Watch Rails service and the Groups::ChildrenController#index latency and database-time panels.

Prerequisite

backfill_active_on_groups must have finished before Elasticsearch serves any of these requests. Check with:

/chatops run batched_background_migrations status

or confirm Elastic::DataMigrationService.migration_has_finished?(:backfill_active_on_groups) in a production console. Until it does, every request takes the PostgreSQL fallback — which is exactly the path this flag is derisking, so the percentage rollout is still meaningful before the backfill completes.

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_global_search. Background: incremental rollout process, feature actors.

Non-production

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

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

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

Or target specific actors instead:

/chatops gitlab run feature set --project=gitlab-org/gitlab,gitlab-org/gitlab-foss group_children_advanced_finder true
/chatops gitlab run feature set --group=gitlab-org,gitlab-com group_children_advanced_finder true
/chatops gitlab run feature set --user=<gitlab-username-of-dri> group_children_advanced_finder 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 https://gitlab.com/gitlab-org/gitlab/-/merge_requests/257715 <milestone>
/chatops gitlab run feature delete group_children_advanced_finder --dev --pre --staging --staging-ref --production

Rollback

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