Add empty project migration to Group Migration

George Koltsov requested to merge georgekoltsov/bulk-imports-projects into master

What does this MR do?

behind feature flag bulk_import_projects.

This MR adds empty project migration to GitLab Group Migration tool that groupimport is working on The idea is to be able to click 1 button to migration any group (with all of it's subgroups and projects) from one GitLab instance to another.

The scope of this MR is to add empty projects, without even a repository, as the plan is to start filling the project up gradually (repo first, then metadata like issues, mrs, updaload, lfs, etc) in future MRs.

Project information is pulled using GraphQL and migrated using Bulk Import's ETL pipeline in 3 separate steps:

  1. Extract project information from GraphQL
  2. Transform / sanitize data in a transformer
  3. Load (create the group using Projects::CreateService)

This MR is very similar to what has been done for Group migration

Documentation will be updated once feature flag is ready to be turned on.

Screenshots or Screencasts (strongly suggested)


How to setup and validate locally (strongly suggested)

  1. Enable bulk_import feature flag (should be enabled by default) Feature.enable(:bulk_import)
  2. Enable bulk_import_projects feature flag Feature.enable(:bulk_import_projects)
  3. Create a group that has subgroups and projects in it. Can be done with a rate task on gdk bundle exec rake "gitlab:seed:group_seed[2,root]"
  4. Open /groups/new#import-group-pane page and enter your gitlab credentials (url & api scoped token). You do not need 2 gitlab instances to perform this test
  5. Select the group you want to import, give it a new name and destination and click Import
  6. Wait for it to finish and verify imported result
  7. Imported group should have all of the projects present, even if they are empty.

Does this MR meet the acceptance criteria?


Availability and Testing


Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by George Koltsov

Merge request reports