Resolve "GitLab Migration - Migrate Snippets Repositories"
Related to #343438 (closed)
bulk_import_projects
feature flag that is currently off by default (and disabled on .com).
What does this MR do and why?
Snippet
scope
Adds a new We need to match snippets by project, title and created_at(disregarding milliseconds).
Most importantly, we're introducing Snippet Repository Migration to GitLab Migration
We firstly migrated snippets DB data on !73271 (merged). Now this MR focus on migrating their repositories.
The idea is to create a SnippetsRepositoryPipeline
that will read from GraphQL, with pagination, the snippets for a the migrated project, while collecting their repositories' url and cloning their repositories from the source GitLab instance to the GitLab target instance.
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 Snippets in the newly created project, with at least 2 files. Add notes and emoji awards to it.
- Go to
/groups/new#import-group-pane
page and enter instance url and access token (needs to beapi
scope). - Select newly created group and click Import.
- Wait for Group import to complete and verify imported project's snippets got imported with both their files.
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.