Pull request status check SonarCloud quality gate no longer working

We have branch policies that protect a branch with PR, and a Status Check policy on the Quality Gate results of an analysis. Everything is working fine, I can see the quality gate result in SonarCloud, but it is not reporting back to the PR in DevOps, thus the PR is stuck with the quality gate status check in “Waiting”.

I have refreshed, re-queued the build (which runs the analysis as a task), but this has had no effect. I also check for any failed Background Tasks on the SonarCloud side and don’t see any.

This issue started 01/05 and so far, everything has been working without any issues.

Hi @francisbachabi81,

Welcome to the community!

Can you share the latest background task id of the analysis that was not reported to the SonarCloud?

Best,
Marcin

Please see this thread that was closed:

We are also seeing this issue where the Azure DevOps Pull Request is “waiting” on SonarCloud/quality gate. The other thread mentioned unauthorized, we have updated the Personal Access Token (PAT) that is used, which seemed to fix the issue for 1 pull request, but other pull requests to that same repo/SonarCloud Project are still stuck in this status (even after a new build).

Task ID AXcl1yC583oxLrX_4-44

This is delaying our teams as an admin has to override the pull request policies to get completed work merged into our main branch.

Another task id of a “waiting” quality gate: AXclvY97SjzTL_nTUVHt

Hi @W0GER,

Thanks for reporting the issue. The problem should be solved. Can you re-analyze and verify?

Best,
Marcin

I kicked off a new build of a PR and the status is still at “waiting”
task id: AXcqer4C3FhP-S2Bmma_

@W0GER Everything looks good on my side. The decoration finished with the success. I reached out to you in private message

We have the same problem.

image

task id: AXdn0zJsuNGVILhuatqf

We’ve tried running several builds, but it didn’t work. Now we’ve been forced to disable the plugin because we couldn’t merge finished feature branches.

Our PAT expired 1 week ago but this has been updated:
image

Also, our organization (including projects) is bound to Azure DevOps

Hi @froens ,

It looks like the call has been unauthorized. Can you check if you set a token in a separate setting on the project level? If it is set with invalid token, this will override the token you have set on the organization level.

Best,
Marcin

Hi Marcin

Thank you very much for your fast reply. It worked after resetting the token on the project level.

So this means: If our organization has a token, then this is used on interactions with DevOps, unless a project specific token is set on the project?

Best regards
Frederik

Hi @froens,

I am glad it works! This is exactly the case. If you set the token on a project level, this one will be used regardless of the fact that you set one on the organization level.

Best,
Marcin

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.