Unable to save inline comments on a merge request

Summary

I'm getting properly-handled 422 errors back from the API when I try to save a comment on an open merge request:

Steps to reproduce

  1. Open gitlab-com/www-gitlab-com!81207 (diffs)
  2. Try to save a comment with a suggestion in it to line 3 of data/release_posts/13_12/browser-performance-job-rename-release-update.yml

Example Project

  • gitlab-org/gitlab, MR linked above.

What is the current bug behavior?

I get an error and lose my comment text. Since I'm not doing anything unusual, I don't expect this comment save to fail. I'm using the auto-generated suggestion snippet and the rest is plain text.

What is the expected correct behavior?

My comment and suggestion persisted to the merge request.

Relevant logs and/or screenshots

lost_comment

image

Output of checks

This bug happens on GitLab.com

Possible fixes