Restarting the SonarCloud Analysis DID NOT solve the issue now, contrary to what I was saying. This was not the case at the time of my first message.
Thanks @mickaelcaro for your feedback
Restarting the SonarCloud Analysis DID NOT solve the issue now, contrary to what I was saying. This was not the case at the time of my first message.
Thanks @mickaelcaro for your feedback
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 there,
Another update : fix has been deployed, everything should be back to normal now.
Let us know.
Thanks.
Mickaël
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.
Best,
Marcin
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)
Best,
Marcin
Ah… ok. I don’t think I updated THAT one.
I just updated it with a current token… and rerunning the PR build process.
fingers crossed
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.
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.
Best,
Marcin
This is the token I generated… and yes to Read & Write
But I suppose we can generate another one… and go to update usage of tokens (again) to ensure THIS token is the one used.
Are we at that step?
Let’s create new token, but before replacing it in SonarCloud, could you test if it works?
The easiest test would be to get the token and then get the base64 of this token:
echo -n ':<token>' | openssl base64
please pay attention to “:” it has to be included. After that you can execute the following query:
curl --location --request GET 'https://dev.azure.com/<org>/<project>/_apis/git/repositories/<repo>' \
--header 'Accept: application/json' \
--header 'Authorization: Basic token_base_64'
where token_base_64
is :token
in base64
Let me know how it goes.
Best,
Marcin
I feel that I’ve built the curl command correctly, but nothing comes back. (??)
For the dev.azumer.com URL to GET… i’ve tried that directly in my browser and it returns a JSON object. So I feel the api URL is correct.
I run my token through openssl to get a base64… and pasting that value into the space for token_base_64.
I’ve blacked out my info… but here’s the command
Only different from your comment is use of " rather than ’ , because I’m running in Win10… seems reasonable.
Feels like it’s still something with that token… because if I try random value for my token… the value after “Basic”… I get back the same no-reply response.
Any chance we can switch over to an email, to help avoid sharing tokens and logins on community pages?
I’ve tried to create a new token… pass it though base64 … and run the curl command to issue a GET… same 'no reply"
Hi @Marcin_Majewski we still have issues, should I open another thread?
We now have also PR with quality gate that are not met - red, not reporting to ADO and ignored, thus merged, in addition to PR with green gates still waiting on the results and blocked
Thanks for your guidance,
Best
Alex
Hey @alhugot-emr,
Yes! Please do open another thread and put the background analysis id of the analysis that was not delivered so I can investigate.
Best,
Marcin
thank youx further discussion will go here: SonarCloud Quality Gate in infinte waiting status on Azure DevOps PR