ES migration to backfill project permissions fields on merge requests
Proposal
Create an ES migration to update all the existing merge request documents with the project permissions fields. The two fields that need to be populated are visibility_level
and merge_requests_access_level
. This should be done in a similar fashion as 20201116142400_add_new_data_to_issues_documents.rb
but keep in mind Best Practices for Elasticsearch Migrations which includes some additional information beyond what was included in the issues documents backfill.
As part of this work, create a calculation for how long this is expected to run on GitLab.com. That can be done by using the total merge requests count from Elasticsearch and the batch size + throttle delay.
Edited by Terri Chu