Fix Import/Export milestone and 1to1 models issue
Fix 1to1 relations on project failing to be importing and milestone ordering issue.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/22585
-
CHANGELOG entry added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if you do - rebase it please) -
Squashed related commits together
Merge request reports
Activity
Added 70 commits:
-
960ac70b...477f0309 - 69 commits from branch
master
- b6263971 - fix model order in import/export config and 1to1 relation issue. Added relevant specs.
-
960ac70b...477f0309 - 69 commits from branch
Added 1 commit:
- 51c69632 - added changelog
Marked the task CHANGELOG entry added as completed
Marked the task Conform by the merge request performance guides as completed
Marked the task Conform by the style guides as completed
Added 1 commit:
- 18b05ab8 - fix failing spec
Added 1 commit:
- 8a7adda1 - fix model order in import/export config and 1to1 relation issue. Added relevant specs.
Marked the task Squashed related commits together as completed
Reassigned to @dbalexandre
@dbalexandre can you review this one ? Thanks!!
@jameslopez Looks good! What do you think to add some tests to simulate the scenario you described in the issue description will not happen?
- Milestones and possibly labels require a certain order in order to get imported correctly. The following scenario may happen:
- Exported project that contains milestones associated to an issue and also unassigned milestones
- Unassigned milestones are then created successfully
- Assigned milestones get created, but then they fail when the milestone attempts to get assigned to a project once again
Reassigned to @jameslopez
@dbalexandre I actually did add the scenario, sorry it's not very obvious as I should have mentioned it here.
I added to the
project.json
a milestone that hangs from project and is exactly the same as one that hangs from an issue. Without the fix, theproject_tree_restorer_spec
will fail when it tries to restore the models and complain about not being able to save the milestones...I'm gonna resolve the conflicts
👍 Added 24 commits:
-
8a7adda1...ab496d82 - 23 commits from branch
master
- 912e9bae - fix model order in import/export config and 1to1 relation issue. Added relevant specs.
-
8a7adda1...ab496d82 - 23 commits from branch
Reassigned to @rymai