Update way of project repository migration during Gitlab Migration
What does this MR do and why?
bulk_import_projects
feature flag that is currently off by default (and disabled on .com).
This MR:
- Updates the way we import repository as part of GitLab Project Migration (https://docs.gitlab.com/ee/user/group/import/) from using Gitaly
fetch_as_mirror
API, to importing using repository bundle that is exported using relation export API - It fixes an issue with importing Diff comments on MRs with deleted source branch (and potentially other repository related issues where we need to have all git refs present during import)
- Sets
RepositoryBundlePipeline
minimum_sourve_version
to15.1
, since this is when repository bundle export was added to the API - Sets
RepositoryPipeline
to havemaximum_source_version
to15.0
in order to skip it from 15.1, since we have a new way of importing - Slightly refactors
BulkImports::PipelineWorker#perform
for easier read
Mentions #358776 (closed)
Screenshots or screen recordings
How to set up and validate locally
-
Feature.enable(:bulk_import)
. -
Feature.enable(:bulk_import_projects)
. - Create a top level group and project in it.
- Create a new MR and leave some diff comments
- Merge MR and delete source branch
- Go to
/groups/new#import-group-pane
page and enter instance url and access token (needs to beapi
&read_repository
scope). - Select newly created group and click Import.
- Wait for Group import to complete and verify imported project MR diff comments. They should be present.
- Check
bulk_import_failures
table, there should be no errors related to diff notes
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.
Edited by George Koltsov