Remove static concurrency_limit from scan result policy workers
What does this MR do and why?
Removes the hardcoded concurrency_limit -> { 200 } from two security policy workers:
Security::ScanResultPolicies::SyncMergeRequestApprovalsWorkerSecurity::UnenforceablePolicyRulesPipelineNotificationWorker
Both workers are enqueued from the same trigger points (pipeline completion and MR creation on projects with merge request approval policies), so load spikes hit both queues simultaneously and both were getting concurrency limited at the fixed cap of 200 concurrent jobs.
With the static limit removed, the concurrency limit falls back to DEFAULT_CONCURRENCY_LIMIT_PERCENTAGE_BY_URGENCY. Both workers have :low urgency (SyncMergeRequestApprovalsWorker declares it explicitly, UnenforceablePolicyRulesPipelineNotificationWorker gets it by default), so each is allowed up to 25% of the Sidekiq fleet's threads (GITLAB_SIDEKIQ_MAX_REPLICAS * SIDEKIQ_CONCURRENCY * 0.25). The limit now scales automatically with fleet size instead of requiring manual retuning, and the existing throttling middleware can still lower the effective limit dynamically under load.
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
No UI changes.
How to set up and validate locally
The change only affects the Sidekiq concurrency limit middleware configuration. Verify via console:
Security::ScanResultPolicies::SyncMergeRequestApprovalsWorker.get_concurrency_limit
Security::UnenforceablePolicyRulesPipelineNotificationWorker.get_concurrency_limitBoth now return the value computed from max_concurrency_limit_percentage defaults (0 locally unless GITLAB_SIDEKIQ_MAX_REPLICAS/SIDEKIQ_CONCURRENCY are set) instead of 200.