Skip to content

Enforce using the latest diff version when creating suggestions

What does this MR do?

This enforces the usage of the latest diff file content when creating suggestions. This is a bugfix of an issue that can just be seen through EE when publishing outdated draft notes. In general, we were using the note.original_position, which points to an outdated version of the MR, thus fetching an outdated blob of a file, which leads to creating an unexpected suggestion diff when publishing the review.

Further details of the issue can be seen on https://gitlab.com/gitlab-org/gitlab-ee/issues/9876.

Ideally we should manage to work on https://gitlab.com/gitlab-org/gitlab-ee/issues/8823 to fully support suggestions on draft notes.

What are the relevant issue numbers?

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/9876

Does this MR meet the acceptance criteria?

Edited by 🤖 GitLab Bot 🤖

Merge request reports