[FF] ci_runner_partition_pruning -- runner_type filters on Ci::Runner read scopes

Summary

Roll out the feature currently behind the ci_runner_partition_pruning feature flag.

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?

The flag gates a runner_type filter added to Ci::Runner.belonging_to_project / belonging_to_group (introduced in !240576 (merged)). The filter is logically a no-op — ci_runner_projects only references project-type runners and ci_runner_namespaces only references group-type runners — so enabling it should not change result sets, only let PostgreSQL prune ci_runners partitions.

Blast radius: read-path runner queries (runner list/finder, EE stale group runners prune, DevOps adoption snapshot). No writes are affected by the flag. Worst realistic case is a query-plan regression on a specific shape, mitigated by instant rollback (flag off). Watch the database and Sidekiq/runner dashboards during rollout.

Rollout

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

Note

This flag is checked with Feature.enabled?(:ci_runner_partition_pruning, Feature.current_request). The gated code (Ci::Runner.belonging_to_project / belonging_to_group) is a class-level scope invoked with raw ids, id arrays, and relations, so there is no project/group/user domain actor to target. Roll out by percentage of actors (the request is the actor). --project / --group / --user targeting has no effect here — do not use it.

Non-production

/chatops gitlab run feature set ci_runner_partition_pruning true --dev --pre --staging --staging-ref

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

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

Then finalize:

/chatops gitlab run feature set ci_runner_partition_pruning 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 ci_runner_partition_pruning --dev --pre --staging --staging-ref --production

Rollback

/chatops gitlab run feature set ci_runner_partition_pruning false                                         # production
/chatops gitlab run feature set ci_runner_partition_pruning false --dev --pre --staging --staging-ref     # non-production
/chatops gitlab run feature delete ci_runner_partition_pruning --dev --pre --staging --staging-ref --production  # remove entirely
Edited by Narendran