SonarCloud: Gitlab integrations deletes other comments

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 agent SonarQube/ originating from three AWS IP addresses: , , and .

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.

Hi, we indeed recommend using a dedicated user for MR decoration in our documentation.

That said, there is this improvement listed on our side, to filter out non-quality gate comments from deletion.

hi @pierreguillot - looking at that issue I notice that it was closed a few hours ago. Does that mean the issue was fixed?
If yes, how do I know its been released?

Yup, I fixed the issue and that will be part of 8.5. Target release date is October 5th. (No commitment on the release date, but yeah it should happen soon)

@pierreguillot apparently the problem still does happen

Oh sorry i missread the thread name. This has been fixed in SonarQube. I’m asking the SC team about this.

Hello @Lucas_Lobosque,

Thanks for reporting this. We’re currently implementing a fix, I’ll let you know once it is done.

Hi @TomVanBraband, thanks.

Let me know and I will test it once its ready.

Hi @Lucas_Lobosque,

Apologies for the delay. This should now be fixed, could you let me know if that is the case for you?