[FF] ci_optimize_merge_request_approved_resolution -- scope CI_MERGE_REQUEST_APPROVED preload to avoid /jobs/request timeout

Summary

Roll out the fix currently behind the ci_optimize_merge_request_approved_resolution feature flag.

  • DRI: @lauraXD
  • Team Slack channel: #g_pipeline_authoring

What could go wrong?

Blast radius: POST /api/v4/jobs/request (job registration) for merge request pipelines. The flag reduces the preloading done while resolving CI_MERGE_REQUEST_APPROVED.

  • Worst case if the preload scoping is wrong: projects with "Prevent approval by users who add commits" enabled could hit an N+1 when computing approved? — slower, not incorrect — mitigated by disabling the flag.
  • No data-loss risk.

Rollout

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

  • /chatops gitlab run feature set --project=[REDACTED] ci_optimize_merge_request_approved_resolution true

  • /chatops gitlab run feature set --project=gitlab-org/gitlab,gitlab-org/gitlab-foss ci_optimize_merge_request_approved_resolution true

  • /chatops gitlab run feature set ci_optimize_merge_request_approved_resolution 25 --actors

  • /chatops gitlab run feature set ci_optimize_merge_request_approved_resolution 50 --actors

  • /chatops gitlab run feature set ci_optimize_merge_request_approved_resolution true

    Cleanup

Remove the flag once deemed stable — see cleaning up. Remove the flag and its YAML definition from the codebase, then:

/chatops gitlab run feature delete ci_optimize_merge_request_approved_resolution --dev --pre --staging --staging-ref --production

Edited by Laura Montemayor