Attempt to fix Transient failure in ee/spec/lib/ee/gitlab/import_export/group_tree_saver_spec.rb:44
What does this MR do?
I don't know for sure if this is the problem.
The content of saved_group_json['epics']
is a hash. Calling saved_group_json['epics'].first
seems non-deterministic.
If you get the wrong item (the parent epic instead of the child epic), then saved_group_json['epics'].first['parent']
and saved_group_json['epics'].first['notes']
would be nil
.
Click here to see contents of `saved_group_json['epics']`
[{"id"=>2,
"group_id"=>2,
"author_id"=>3,
"assignee_id"=>nil,
"iid"=>2,
"updated_by_id"=>nil,
"last_edited_by_id"=>nil,
"lock_version"=>0,
"start_date"=>nil,
"end_date"=>nil,
"last_edited_at"=>nil,
"created_at"=>"2020-01-16T00:33:20.300Z",
"updated_at"=>"2020-01-16T00:33:20.905Z",
"title"=>"My title 2",
"description"=>nil,
"start_date_sourcing_milestone_id"=>nil,
"due_date_sourcing_milestone_id"=>nil,
"start_date_fixed"=>nil,
"due_date_fixed"=>nil,
"start_date_is_fixed"=>nil,
"due_date_is_fixed"=>nil,
"closed_by_id"=>nil,
"closed_at"=>nil,
"parent_id"=>1,
"relative_position"=>nil,
"state_id"=>"opened",
"start_date_sourcing_epic_id"=>nil,
"due_date_sourcing_epic_id"=>nil,
"milestone_id"=>nil,
"parent"=>
{"id"=>1,
"group_id"=>2,
"author_id"=>2,
"assignee_id"=>nil,
"iid"=>1,
"updated_by_id"=>nil,
"last_edited_by_id"=>nil,
"lock_version"=>0,
"start_date"=>nil,
"end_date"=>nil,
"last_edited_at"=>nil,
"created_at"=>"2020-01-16T00:33:20.235Z",
"updated_at"=>"2020-01-16T00:33:20.235Z",
"title"=>"My title 1",
"description"=>nil,
"start_date_sourcing_milestone_id"=>nil,
"due_date_sourcing_milestone_id"=>nil,
"start_date_fixed"=>nil,
"due_date_fixed"=>nil,
"start_date_is_fixed"=>nil,
"due_date_is_fixed"=>nil,
"closed_by_id"=>nil,
"closed_at"=>nil,
"parent_id"=>nil,
"relative_position"=>nil,
"state_id"=>"opened",
"start_date_sourcing_epic_id"=>nil,
"due_date_sourcing_epic_id"=>nil,
"milestone_id"=>nil},
"notes"=>
[{"id"=>1,
"note"=>"My title 3",
"noteable_type"=>"Epic",
"author_id"=>4,
"created_at"=>"2020-01-16T00:33:20.891Z",
"updated_at"=>"2020-01-16T00:33:20.891Z",
"project_id"=>1,
"attachment"=>{"url"=>nil},
"line_code"=>nil,
"commit_id"=>nil,
"noteable_id"=>2,
"system"=>false,
"st_diff"=>nil,
"updated_by_id"=>nil,
"position"=>nil,
"original_position"=>nil,
"resolved_at"=>nil,
"resolved_by_id"=>nil,
"discussion_id"=>"c1b4261966253481757bc8bbd1b7d36e2ad83ab3",
"change_position"=>nil,
"resolved_by_push"=>nil,
"review_id"=>nil,
"type"=>nil,
"author"=>{"name"=>"John Doe5"}}]},
{"id"=>1,
"group_id"=>2,
"author_id"=>2,
"assignee_id"=>nil,
"iid"=>1,
"updated_by_id"=>nil,
"last_edited_by_id"=>nil,
"lock_version"=>0,
"start_date"=>nil,
"end_date"=>nil,
"last_edited_at"=>nil,
"created_at"=>"2020-01-16T00:33:20.235Z",
"updated_at"=>"2020-01-16T00:33:20.235Z",
"title"=>"My title 1",
"description"=>nil,
"start_date_sourcing_milestone_id"=>nil,
"due_date_sourcing_milestone_id"=>nil,
"start_date_fixed"=>nil,
"due_date_fixed"=>nil,
"start_date_is_fixed"=>nil,
"due_date_is_fixed"=>nil,
"closed_by_id"=>nil,
"closed_at"=>nil,
"parent_id"=>nil,
"relative_position"=>nil,
"state_id"=>"opened",
"start_date_sourcing_epic_id"=>nil,
"due_date_sourcing_epic_id"=>nil,
"milestone_id"=>nil,
"notes"=>[]}]
Screenshots
Does this MR meet the acceptance criteria?
Conformity
Edited by Michael Kozono