SonarCloud/Quality Gate Stuck in Waiting

  • ALM used - Azure DevOps Services
  • CI system used - Azure DevOps Services
  • Scanner command used when applicable - VS/MSBuild
  • Error observed - When setting up SonarCloud PR Decoration within Azure DevOps Services, the scans will complete and whether the quality gate passes or fails, the pull request is stuck on the ‘SonarCloud/quality gate’ check.
    image
  1. Correct Status Check is added to branch policies
    image
  2. PATs between Azure DevOps and SonarCloud have been updated multiple times with an account that has sufficient permissions. Sonar PAT added to ADO side and ADO (Code - Read/Write) token added to SonarCloud configuration.

This appears to be a common issue, but continues to occur at random times.

Is there a planned fix for this that will remain?

Hi Preston,

Would you mind sharing your pipeline (possibly redacting sensitive information)?

Denis

Steps:



image

Jobs:
image

Pipeline:

Main branch policies:

Within the steps, I am calling scripts that set the Provider and VSTS token to the proper values generated from SonarCloud

Hi !

We are experiencing a similar problem, where sonar gives us a 100% coverage

But then the quality gate is not being shown as green.

And all the pipeline steps run without any error / issue
image

FYI We had a similar issue ( diff was that it used to be always failing as now seems more random )
a few months back

@denis.troller , have there been any sort of status updates for this issue? I provided my pipeline below as requested.

Hi Preston,

Sorry for not coming back to you more quickly!
As an experiment, could you remove the sonarcloud-buildbreaker task from your pipeline and see if it improves things? We have had issues in the past with it, so it would be good to rule it out first.

Denis

@denis.troller , even after removing that step from the pipeline, it continues to hang
image

Would you mind sharing the output of the pipeline run?

@denis.troller , I would need to redact the log first before I can send it over as it has a bit of personal creds and code in it. What information are you looking for specifcally?

I do not know exactly what I am looking for at this point, it’s more to understand what could be going on here. Please do redact sensitive information in it.

@denis.troller , do you need anything in regards to the actual build process itself? This log is 45k+ lines long and probably 75% of it is tied to just the build.

Are you okay with just the Sonar steps themselves?

@denis.troller , I have completed the redacting of the log, but my CISO requested that I contact you directly. Is there any way that you can provide an email address?

Hi, thanks for the logs. I have raised the issue with the proper team and will get back to you as soon as we have anything or if we require further enquiries.

Denis

@denis.troller , checking in on this to see if there are any updates from the team.

Please let me know.

Thank You,
Preston

@denis.troller , I am following up again as I have not heard any updates for bout 2 weeks now. Please let me know what the status is of this issue.

@denis.troller is someone still looking into this issue?