I am having all the comments deleted from a MR when SonarCloud posts the comment with the data from the report.
I first contacted gitlab support, which confirmed the issue is related with SonarCloud:
Hey Lucas,
Thanks for contacting GitLab Support.
We’re sorry to hear about the issue. We’ve received a few reports from other customers of this same behavior and have tracked it down to be a bug with SonarCloud in how it interacts with GitLab. Other customers have reported that SonarCloud will delete old comments on a merge request once an analysis has run and could be doing it at other times as well.
In this particular case I’ve checked our logs and have confirmed this is the case. On that merge request there are numerous
DELETE
requests made via the API to comments on it all with the user agentSonarQube/8.0.0.12534
originating from three AWS IP addresses:18.196.105.168
,10.216.1.21
, and18.196.105.168
.As a potential workaround, we did have a customer experiencing this issue report that they got around it by creating a user specifically for the SonarCloud integration rather than having it be run through the account of a normal member of your group such as yourself.