Skip to content

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

  1. In rails console enable the experiment fully
    Feature.enable(:batched_api_mergeability_checks)
  2. Change the merge_status of some open MRs via console
      merge_request.mark_as_unchecked!
  3. Run gdk stop rails-background-jobs to stop the processing of background jobs temporarily to allow us to inspect the job queue
  4. 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
  5. Check MergeRequests::MergeabilityCheckBatchWorker job has been added with correct merge_request_ids
  6. Run gdk start rails-background-jobs to start background jobs
  7. 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.

Related to #410125

Edited by Sincheol (David) Kim

Merge request reports