Add merge_request_refs_cleanup feature flag

Merged Patrick Bajao requested to merge pb-mr-cleanup-ff into master

What does this MR do?

We are experiencing performance issues with the merge request refs cleanup functionality on production and some customers instances. This became more visible when we started backfilling MergeRequest::CleanupSchedule records for old merge requests.

Disabling the worker and scheduler for now behind a feature flag so we can test the feature once we improve it's scheduling logic before enabling it on other instances.

The scheduler is currently disabled on via a kubernetes config change in gitlab-com/gl-infra/k8s-workloads/gitlab-com!621 (merged).

Does this MR meet the acceptance criteria?


Availability and Testing


If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • 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