Mark resource group assignment as urgent and CPU bound
What does this MR do and why?
Mark Ci::ResourceGroups::AssignResourceFromResourceGroupWorker as high urgency and CPU bound.
This worker assigns resources from resource groups and enqueues waiting jobs to be executed by runners. Delays in this worker add user-visible latency to jobs waiting on resource_group constraints.
Rationale for CPU bound: Over the last 7 days (https://log.gprd.gitlab.net/app/r/s/DfSmP):
- p50
cpu_s / duration_stends just over 0.4, meeting the 0.33 threshold. - p95
cpu_s / duration_stends around 0.65.
Rationale for high urgency: It blocks pipeline processing for jobs waiting on resource groups, and over the last 7 days (https://log.gprd.gitlab.net/app/r/s/smjWM):
- 7-day 3-hourly p50
duration_sis around 0.15s. - 7-day 3-hourly p95
duration_sis under 5s.
The pgbouncer-ci pool concerns noted in the work item discussion are resolved (graph).
This intentionally keeps data_consistency :always. The worker writes while assigning resources, and free_resources = resource_group.resources.free.count must be current to avoid allowing too many concurrent CI jobs to start for a resource group.
References
Part of #593064 (closed)
How to set up and validate locally
Run the worker spec:
bundle exec rspec spec/workers/ci/resource_groups/assign_resource_from_resource_group_worker_spec.rbMR 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.

