Sonarqube/quality gate waiting

sonarqube/quality gate waiting in azure DevOps PR

sonarqube-developer-10.6

  • how is SonarQube deployed: zip
  • what are you trying to achieve: Prs in azure dev ops
  • what have you tried so far to achieve this: I updated the version, added pollingTimeoutSec, updated PAT, updated sonarqubeKey

Hey there.

Have you configured the required project-level settings?

Hello Colin,

yes, it says configuration valid

Thanks for checking that.

Do you see Pull Requests analyzed in SonarQube?

yes, but not the latest ones even tho test have passed, but quality gate stays in waiting.

If the latest PRs aren’t showing up (and those are the ones where the Quality Gate isn’t being reported to Azure DevOps)… well there you go!

Have you checked the pipeline logs of those pull requests to see why analysis wasn’t uploaded to SonarQube? Do you see the SonarQube tasks running in the context of those PRs?

##[warning]This task is deprecated. Please upgrade to the latest version. For more information, refer to SonarQube extension for Azure DevOps

##[warning]Task ‘x’ takes too long to complete. Stopping after 600s of polling. No quality gate will be displayed on build result.

okay I see, should I update and also add more time so it can complete?

Hm. Before doing that, I suggest making sure your background tasks are ever getting processed. You or an instance admin can check the global Administration > Projects > Background Tasks. If a lot of tasks are piling up and not processing, that represents another issue. If they’re just taking a long time, that’s another thing.

there are no tasks with pending status. All of them are with success status. regarding the duration it has many different times, for example for one project sometime is 36seconds other times +10min. And other projects reach times of +1h

If all your background tasks eventually get processed, then eventually your PRs should be decorated, even if it takes a while. Is that happening? If so, then the real thing we need to investigate is Compute Engine performance.