Github Pull Request Decorations missing

Hi,

we’re experiencing problems with Github Pull Request decorations from SonarCloud since around a week. We’re running the SonarCloud analysis via maven from our Jenkins server. It’s configured that SonarCloud updates the pull request decorations in Github for the respective pull requests.
The call looks similar to this:

    mvn sonar:sonar -Dsonar.projectKey=xxx -Dsonar.organization=xxx -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=xxx -Dsonar.pullrequest.github.repository=xxx -Dsonar.pullrequest.key=xxx -Dsonar.pullrequest.branch=xxx -Dsonar.pullrequest.base=xxx -Dsonar.pullrequest.provider=github -Dsonar.coverage.jacoco.xmlReportPaths=xxx

Our setup didn’t change, but since around 1 week the pull requests in Github do not get updated anymore, but say something like this " SonarCloud Queued 4 days ago".

The scans in SonarCloud run through successfully and it’s possible to see all the successful pull requests. In Github the checks from SonarCloud are missing, though. If I go to the scan in SonarCloud and click on “See the PR”, I get forwarded to the correct pull request in Github.

We had set the checks as required for merging pull requests. We needed to remove this now, since it blocks all our open pull requests.

Any ideas on this?
Thanks!
Patrick

1 Like

Hi Patrick,

Can you please confirm if you see any warnings on the UI in a yellow box near the “See the PR” link? If something went wrong while creating the Check, I believe we should see warnings about it.

Or, if you look at the Background Tasks page, and one of the pull requests where the Checks are missing, do you see any errors reported?

If there are no warnings or errors, then I think I’ll need to dig into our server-side logs related to the pull requests. Is the project private? If not, then please share the complete mvn sonar:sonar ... command so we can locate it in our logs. If private, then I’ll contact you privately.

Hi @janos,

there’s no warning on the UI near the “See the PR” link. I’ve also checked the background tasks page: All of them have status “Success”.
The repository is private. I’d be happy to provide you with more detailed information in private to be able to track down the issue.

Thanks!

Hi Patrick,

Is your :sonarcloud: organization bound to the GitHub organization? That implies to install the Github App.

Hi Simon,
yes, the Github App for SonarCloud is installed. It already worked for a few months, but since ~ a week ago, we face these issues.
(I double checked in Github’s “Integration & Services” and the SonarCloud app is listed as installed app.)

Ok, so could you check the merge policy of pull requests in Jenkins? Only “the current pull request revision” is supported. Other options generate new sha that are unknown from Github.
See SonarCloud in Jenkins Pipeline does not update GitHub PR and Check

1 Like

Hi Simon,
we don’t have this setting in our build configuration.
In the sonar cloud jenkins job we “manually” check out the respective branch and pull the latest version of it via an bash script.

any word on this? I’m suddenly having this same issue as of a couple days ago

Can you please verify that the sha1 of the working tree when the analysis runs on Jenkins is the same as the sha1 of the HEAD of the pull request on GitHub?