Resolve "gitlab.com: Unable to import a project that was just exported"
What does this MR do?
Fixes 2 issues:
- Due to a DB inconsistency issue, we have
NULL
IID
pipelines (normally in old instances, such as GitLab.com). These pipelines get imported with aNULL
IID
, it then generates a new one which could clash with future fixed IIDs during the import. - We fill in
user_id
(and other user IDs) after the models are created, this should be done beforehand for pipelines.
This is really a regression from https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16221
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides
Closes #51747 (closed)
Closes #43896
Closes #43840 (closed)
Edited by James Lopez