SonarCloud Quality Gate build policy not updated in pull request

Jonas vR 60 Reputation points
2025-05-28T08:15:29.9133333+00:00

Since the beginning of this week our Sonar Quality Gate build policy is not updated anymore in the pull request without us changing anything.

The Sonar pipeline runs as usual on creation of a PR.
The pipelines that link to the PR also show the Quality Gate state in the Extension view of the pipeline (see screenshot).
The policy check on the PR however is not updated anymore.
Screenshot 2025-05-28 at 10.13.46

Screenshot 2025-05-28 at 10.14.24

Azure DevOps
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Alex Burlachenko 9,780 Reputation points
    2025-05-29T07:56:47.58+00:00

    Hi Jonas!

    thanks for dropping this question

    so ur saying the sonarcloud pipeline runs fine, the quality gate shows up in the extension view, but the PR policy check just... ghosts u?

    sometimes the build policy just needs a little nudge. go to ur project settings in azure devops, find the branch policies section, and make sure the "sonarcloud/quality gate" check is still properly configured. microsoft docs actually mention this can get wonky after updates: branch policies docs

    another sneaky thing the api might be timing out. sonarcloud uses webhooks to update azure devops, and if there's network lag, the status might not propagate. u can try re-running the pipeline manually to see if that kicks it awake ) and check the service connection between azure devops and sonarcloud. sometimes the authentication tokens expire without warning. u can find this under project settings > service connections. service connections docs

    if none of that works, there might be a caching issue. azure devops can be stubborn about updating PR statuses. try closing and re-opening the PR - that often forces a refresh.

    last resort check the sonarcloud web ui directly. sometimes it shows errors that don't bubble up to azure devops. look for any warnings about analysis not completing properly.

    hope this helps! let me know.

    Best regards,

    Alex

    and "yes" if you would follow me at Q&A - personaly thx.
    P.S. If my answer help to you, please Accept my answer
    PPS That is my Answer and not a Comment
    

    https://ctrlaltdel.blog/


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.