Add concurrency_limit_scope to mergeability check workers

What does this MR do and why?

Caps each top-level group at a share of the Sidekiq concurrency limit of MergeRequestMergeabilityCheckWorker (15%) and MergeRequests::MergeabilityCheckBatchWorker (10%), behind the mergeability_check_concurrency_limit_scope flag. One group's mergeability checks can then no longer take a large share of the shared shard. Jobs over the share are deferred, not dropped. This uses concurrency_limit_scope in the same way as the pipeline creation workers.

MergeabilityCheckService#async_execute now enqueues with the project in context. Some callers, like the instance-wide merge request list, enqueue with no project or group in context, and the scope does not count those jobs.

The flag has no effect until sidekiq_concurrency_limit_scope is enabled on GitLab.com.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading
Loading