Investigate how a draft note can be published then `NoteDiffFile` will fail to create
<!---
Please read this!
Before opening a new issue, make sure to search for keywords in the issues
filtered by the "regression" or "type::bug" label:
- https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=regression
- https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=type::bug
and verify the issue you're about to submit isn't a duplicate.
--->
### Summary
We get reports from Slack wherein diff notes can be created without `NoteDiffFile` due to error . They show up as empty threads:
{width=400}
These are getting created after draft notes are published. Example of some draft notes:
{width=400}
And how they look like in the "Submit your review" drawer:
{width=400}
### Steps to reproduce
Not clear yet. But MR ended up in a state like this after publishing review and the publish request failed.
### Example Project
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/191915
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/190266
### What is the current *bug* behavior?
Draft notes are published but broken state.
### What is the expected *correct* behavior?
Draft notes get published with `NoteDiffFile` created.
issue