Skip to content

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

  1. Feature.enable(:bulk_import).
  2. Feature.enable(:bulk_import_projects).
  3. Create a top-level group and a project in the group.
  4. Go to /groups/new#import-group-pane page and enter the instance URL and access token (needs to be api & read_repository scope).
  5. Select the newly created group and click Import.
  6. 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.

Edited by Rodrigo Tomonari

Merge request reports