Sonar PR status check suddenly stopped working

  • versions used:
    sonarcloud.io
    sonarscanner: sonarsource/sonar-scanner-cli:4.3

  • error observed
    PR analysis is not reporting the GitHub status check.
    sonarbot comments with the analysis summary though.


  • steps to reproduce
    We have always been executing the step the same way:

        image: sonarsource/sonar-scanner-cli:4.3
        step: sonar-scanner
          -Dproject.settings=build/sonar-project.properties
          -Dsonar.login=$SONAR_LOGIN
          -Dsonar.pullrequest.key=$PULL_NUMBER
          -Dsonar.pullrequest.branch=$BRANCH_NAME
          -Dsonar.pullrequest.base=MASTER
          -Dsonar.pullrequest.github.repository=$REPO_OWNER/$REPO_NAME
          -Dsonar.scm.revision=$PULL_PULL_SHA
    

Also observed that PR details are not coming through to sonarcloud:

Screenshot from 2020-09-04 12-56-20

Been seeing this for all our PRs today

Please help figure this out. Is this some sort of outage?
Just to sort of rule out any image issues, we also tried sonarsource/sonar-scanner-cli:4.4 with the same outcome.

2 Likes

We tried to look at the difference between a successful execution on the same project that happened 20 hours ago and it had the following extra log lines:

INFO: SCM Publisher SCM provider for this project is: git
INFO: SCM Publisher * source files to be analyzed
INFO: SCM Publisher */* source files have been analyzed (done) | time=180ms

Not sure why the SCM publisher thing isnā€™t running anymore. It does look like this might be the root cause

1 Like

I have similar problems:


There are no errors on build and also ā€œBackground Tasksā€ on sonar.io have SUCCESS status.

1 Like

I am also seeing this issue today suddenly. The Sonar bot has posted a summary of the scan but the PR check says:

SonarCloud Code Analysis Expected ā€” Waiting for status to be reported

We checked whether this was caused by some plugins not getting loaded. But recent analysis also had:

  • Git 1.12.0.2034 (scmgit)

We also tried setting sonar.scm.provider=git instead of auto detection. No dice.

Please resolve this soon. We rely on sonarcloud analysis to ensure quality on most of our orgā€™s projects

Iā€™m seeing the same issue with the repo https://github.com/ICTU/quality-time. Three days ago, this PR worked fine: https://github.com/ICTU/quality-time/pull/1427.

Today, this PR: https://github.com/ICTU/quality-time/pull/1433 didnā€™t get the SonarCloud Code Analysis notification (even though the bot commented ā€œKudos, SonarCloud Quality Gate passed!ā€ in the PR conversation).

I donā€™t see the difference in the logs with the SCM publisher that @gazal-k sees.

Looks like SonarSource is looking into this

Fix has just been deployed, it should work fine now! Please do let me know if you are still facing issues.

I can confirm, after rebuild PR now is ok. Thanks.

Thank you. Itā€™s back to how it was. GitHub status check is fine and PR info is appearing correctly on sonarcloud as well.

Working for me again, too. Thank you!

anyone seeing something similar for bitbucket?

Weā€™re also having issue with this. Our SCM is github, most of our repos are private and use the Github app integration.

I no sooner posted the fix was working when a Git repo starting experiencing this issue just now.

yes. Issues for almost 2 weeks on bitbucket. Most the time the plugin doesnā€™t work, but every now and then if you hold your mouth right.