Skip to content

Add Project Migration Labels

George Koltsov requested to merge georgekoltsov/project-migration-labels into master

Mentions #339419 (closed)

this feature is behind bulk_import_projects feature flag that is currently off by default (and disabled on .com).

What does this MR do and why?

This MR adds Labels migration when using Group Migration that includes projects (https://docs.gitlab.com/ee/user/group/import/). It's identical to group labels migration, that is why LabelsPipeline has been updated from being groups only to being used in both Projects and Groups. This MR also updates a few BulkImports::Entity helper methods for convenience.

Note that currently project migration does not include repository import. It's being worked on in a separate MR.

Screenshots or screen recordings

projectmigrationlabels

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

  1. Feature.enable(:bulk_import)
  2. Feature.enable(:bulk_import_projects)
  3. Create a top level group and project in it
  4. Create labels in newly created project
  5. Go to /groups/new#import-group-pane page and enter instance url and access token (needs to be api scope)
  6. Select newly created group and click Import
  7. Wait for Group import to complete and verify imported project's labels

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by George Koltsov

Merge request reports