My org is using Azure DevOps for source control and CI pipelines, with integration into our PR process via branch policies that require acceptable results from SonarCloud. All has been working fine until two weeks ago and I’m attempting to understand / debug what is wrong.
The most notable issue I see within my analysis results page is that it appears the analysis is never completely. While the Quality gate is reporting a green “Passed” result, and all other results look fine, there is a blue status message stating that “Analysis in progress, this can take up to 30 minutes”.
This is from a build from yesterday. Where can I navigate in SonarCloud to help determine what analysis is still running? My gut tells me something is hung up, which is prevent our approved PRs from completing, because they are waiting on results to post somewhere.
We’ve had some changing of roles in our org, and I’m wondering if it’s possible the issue is user permissions? The user that configured most of these settings no longer has access. I’ve tried to visit and recreate / reset / update any settings I can find within my SonarCloud project, to ensure all are associated with current users, with correct roles and permissions, but nothing seems to allow this analysis to fully “Complete”.
We do encounter the same exact same issue for my organization.
However, we did not have any recent change in the organization.
We were able to renew the SonarCloud token in the Azure DevOps service connection.
Everything seems ok, appart from the status not being reported to Azure DevOps and this blue message about an analysis in progress. The Azure DevOps tasks logs are perfectly ok, as usual.
This is the case for all projects we have.
We did not find any way to get a more detailed log.
So is my understanding correct, that the on screen status indication of “Analysis in progress” remaining on screen for days… this is only a UI bug, in that the analysis has completed and it’s only the dashboard / results screen that is incorrect?
And since nothing has really changed with how the analysis is running and providing results, that my issue within DevOps build pipelines, and PRs staling / holding while awaiting for the results to post is likely not impacted by this fix?
I starting to just recreate everything in my Azure Dev Ops… and hope that can solve this. I’ve created a new service connection, that uses a current and verified token (despite the existing connection still seems correct… and is reporting as verified)… and updating any tasks or scripts that use that connection to point to the newly created one.
After double checking on other git repos, I seem still to have the same issue where the SonarCloud quality gate is not reported to Azure DevOps. But sometimes, it does and things are perfectly fine.
I still have the spinner displayed, but I assume this is expected (and OK to me as well).
Hi, The status is now OK on our SonarCloud instance, the build also report correctly the gate in the “extension” but the Azure DevOps pipelines are still waiting on the SonarCloud Quality Gate and blocking the Pull request, any hints?
Thx
Alex
I’m in the same boat here. I feel that I’ve updated / refreshed all connections and tokens and logins… yet my PRs are not able to complete because branch policy ensures positive results from Sonar Cloud, yet those results are not able to get back to Dev Ops.
All other steps are green… just Sonar Cloud Gate is waiting.
When I navigate in SonarCloud to the that specific build’s analysis… it’s reporting Green Passed… (and even the 30 minute alert message is gone… so that seems to be fixed)
Any suggestions on where to look to understand what connection is broken?
And again, my configuration was working fine for about year since we set this up, and then suddenly was broken. Attempting to debug an existing configuration… or at this point… just set it up again with success.
Can you share the background task id that is connected with this analysis that did not deliver quality gate? You can find it in the Project → Administration → Background tasks. I will investigate.
It looks like there is a problem with authorization. Are you sure the token you have set on the project level is correct? (I noticed that you said you refreshed the tokens, but maybe not on the project level)
Same experience
Here’s a new task ID: AXnw_DyLaedlPiNmyJGg for the rerun.
And just confirming the DevOps configuration. Our pipeline has three steps that are related to Sonar Cloud.
Prepare Analysis on Sonarcloud : Happens before the actual build, and immediate after the restore of code
Run Code Analysis
Publish Quality Gate Result
All three of these are running successfully (in that during pipeline, they show green checkboxes)… but with all that’s happening, I’m question that third step… because would not THAT step be the moment to handle the results of the quality gate?
Your configuration looks good. The last step is publishing the quality gate result so the Azure Pipeline can fail. It does not populate the information in the PRs.
Does your PAT/token that you generated has following permissions: Code (Read & Write) ? I still see an unauthorized problem.