Skip to content

Remove extraneous MergeRequestDiff creation

Kerri Miller requested to merge kerrizor/refactor-dashboards_todos into master

What does this MR do and why?

While testing !131407 (merged), I noticed this spec that was creating extraneous merge_request_diff records. This caused problems in !131407 (merged) due to the created diffs not being backed by actual records (needed when creating patch_id shas for fingerprinting diffs - &10249 (closed)). Removing the extraneous record creation and using the merge_request_diff that is created as part of the MR itself (as the newly created record has additional information beyond that of the original merge_request_diff) allows these specs to continue to pass while improving their overall performance by reducing the number of queries executed.

Related to #424542 (closed)

Merge request reports

Loading