In the last few days we’ve had PRs hang waiting on the quality gate. We’ve validated the PAT so that’s not the issue. I can see from both the background tasks and PR activity that Sonar is working. What I have noticed, and this may well be co-incidental, is that the name of the PRs in Sonar has changed between them working and hanging and this also seems to coincide with the a change in the server version from 8.0.0.78820 to 8.0.0.79696.
The PR name has changed from <PR number> - <PR title> to <PR number> - <feature branch name>. Clicking on the PR and then view in DevOps takes me to the feature, not the PR.
The build pipeline runs to completion and they are the only logs we are aware of. Attached the “SonarCloudAnalyze” and “SonarCloudPublish” steps with the repo and project name modified. This repo was last PR’d 22nd this year without issue, and twice in December without issue.
This is happening to every PR (that uses a Sonar quality gate) in the last couple of weeks. I’m told that we’re using self-hosted agents (VM scale set).
Can you add sonar.verbose=true to the extra properties for your analysis and provide the log, redacted as necessary, please?
I’m not quite sure what it will show, because at this point I suspect you should probably talk to your network folks and make sure nothing is being blocked or timed-out on their end. But I think it’s an i we need to dot.
We looked into this extensively, updated the tasks to @44, nothing makes a difference. When we look at the publish task you can clearly see it has received the analysis result and you can see this on the pipeline run too:
Hi,
I’ve seen similar issues with Azure DevOps PRs getting stuck on the Quality Gate, especially after updates in SonarQube Cloud. In some cases, it’s related to how PR metadata is being detected (like switching from PR title to branch name), which can affect the decoration and status checks.
You might want to verify:
PR analysis parameters (sonar.pullrequest.*) are correctly configured
Azure DevOps service connection is still valid and mapped properly
No recent changes in pipeline tasks or SonarQube extension version
Also, try re-running the analysis or triggering a fresh PR to see if the issue persists across all branches.
I also found this troubleshooting guide for similar CI/CD and network-related issues helpful when debugging such cases: https://mytelnoranswertoday.pk/
It gives a general idea of handling stuck processes and connectivity-related problems.
Thanks. The problem seemed to resolve itself a while ago, was hoping to hear that something had changed on the Sonar side. Strange, chalk it up to “one of those things”