Inconsistent merge request comment import for Gitlab Migration
Summary
Gitlab migration has inconsistent import of merge request comments and merge request status.
- Event type comments like
added commit
are missing - Merge request status is sometimes inconsistent
Steps to reproduce
- Issue can be reproduced by running migration of project: https://staging.gitlab.com/gitlab-migration/dri
- Example of nightly pipeline which is reproducing the issue: https://gitlab.com/gitlab-org/manage/import/import-github-performance/-/jobs/2321876665
Example Project
- https://staging.gitlab.com/gitlab-migration/dri
- 2022-04-07_11-11-417_gitlab-migration_dri_export.tar.gz
What is the current bug behavior?
- Missing comments which are imported correctly by file based importer
- Incorrect merge request status
What is the expected correct behavior?
All data migrated correctly
Relevant logs and/or screenshots
{"feature_category":"importers","severity":"ERROR","time":"2022-04-12T07:40:16.383Z","correlation_id":"fcc73b45291503364fe35244419248aa","bulk_import_id":1,"bulk_import_entity_id":2,"bulk_import_entity_type":"project_entity","pipeline_class":"BulkImports::Projects::Pipelines::MergeRequestsPipeline","pipeline_step":"loader","exception_class":"ActiveRecord::RecordNotUnique","exception_message":"PG::UniqueViolation: ERROR: duplicate key value violates unique constraint \"index_merge_requests_on_target_project_id_and_iid\"\nDETAIL: Key (target_project_id, iid)=(2, 8) already exists.\n"},
{"feature_category":"importers","severity":"ERROR","time":"2022-04-12T07:40:18.007Z","correlation_id":"fcc73b45291503364fe35244419248aa","bulk_import_id":1,"bulk_import_entity_id":2,"bulk_import_entity_type":"project_entity","pipeline_class":"BulkImports::Projects::Pipelines::MergeRequestsPipeline","pipeline_step":"loader","exception_class":"DiffNote::NoteDiffFileCreationError","exception_message":"Failed to find diff file"}
Edited by Sean Arnold