Batch mergeability checks in group merge requests API calls
What does this MR do and why?
This MR batches mergeability checks via group merge requests API calls.
How to set up and validate locally
- In rails console enable the experiment fully
Feature.enable(:batched_api_mergeability_checks)
- Change the merge_status of some open MRs via console
merge_request.mark_as_unchecked!
- Run
gdk stop rails-background-jobs
to stop the processing of background jobs temporarily to allow us to inspect the job queue - Make a group merge request API request which would include above MRs such as
http://127.0.0.1:3000/api/v4/groups/22/merge_requests?state=opened&with_merge_status_recheck=true
- Check
MergeRequests::MergeabilityCheckBatchWorker
job has been added with correct merge_request_ids - Run
gdk start rails-background-jobs
to start background jobs - Check the merge_status of those MRs you've updated above and confirm it is correctly updated -->
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #410125
Edited by Sincheol (David) Kim