Refactor ProjectAttributesPipeline to use JsonExtractor in BulkImport
What does this MR do and why?
Refactor BulkImports::Projects::Pipelines::ProjectAttributesPipeline
to use BulkImports::Common::Extractors::JsonExtractor
that was introduced in !84748 (merged). Now the pipeline looks similar to the BulkImports::Groups::Pipelines::GroupAttributesPipeline that also uses the same extractor.
Basically, the logic to download, decompress, and decode the JSON file is now the responsibility of the extractor JsonExtractor.
Note: Changelog wasn't added, because the ProjectAttributesPipeline is behind the feature flag bulk_import_projects
that is disabled by default.
Screenshots or screen recordings
ProjectAttributesPipelineRefactor
ProjectAttributesPipeline migrates several fields of the projects. The screen recording highlights that the project's merge requests settings are being migrated as they are some settings that are migrated by the pipeline.
How to set up and validate locally
-
Feature.enable(:bulk_import)
. -
Feature.enable(:bulk_import_projects)
. - Create a top-level group and a project in the group.
- Go to
/groups/new#import-group-pane
page and enter the instance URL and access token (needs to beapi
&read_repository
scope). - Select the newly created group and click Import.
- Wait for Group import to complete and verify the imported group and project data.
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.