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?
-
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer
Edited by 🤖 GitLab Bot 🤖