GitHub PR Status intermittently not updated

We have intermittent cases where SonarCloud doesn’t update the GitHub PR status after a successful scan with no warnings. This happens several times a week across different repositories and projects. Is there any way to get more visibility as to why this update never happens?

Additional Information:

  • GitHub is code repository
  • CI system used: GitHub Actions
  • Scanner command used:
    • dotnet-sonarscanner begin /key:$SONAR_KEY
      /d:sonar.pullrequest.branch=GITHUB_HEAD_REF \ /d:sonar.pullrequest.key="(echo $GITHUB_REF | cut -d ‘/’ -f 3)"
    • .NET Build
    • dotnet-sonarscanner end /d:sonar.login=$SONAR_LOGIN
  • Languages: C# .NET Core projects
  • Project/Repo Links: My Sonar projects and GitHub repositories are private so I cannot share them here
  • Issue: Across many projects, seemingly randomly, SonarCloud simply fails to update the GitHub PR status. SonarCloud completed the scan successfully without warnings in the UI, but it just never updates the GitHub PR status.
  • Reproduce: I have no way to reliably reproduce
  • Workaround: requires committing pointless changes to the repo to trigger build and a new SonarCloud scan, hoping that the status updates the next time

Welcome to the community!

Given the distributed nature of a cloud environment, some updates are bound to get lost every once in a while, but very rarely.

Can you please confirm a few points:

  • When you notice that the status was not updated for a PR:
    • On SonarCloud side, do you see a link to the PR’s page on GitHub?
    • Do you see this happen on the first analysis of a PR or on non-first analyses too?
  • In recent weeks GitHub had many issues. Could that coincide with the time when you were experiencing missed status updates?
  • Do you have a rough idea about the frequency of this happening?

I will also open a private thread to get details about your project to investigate further at our side.