ALM used (GitHub, Bitbucket Cloud, Azure DevOps)
CI system used (Bitbucket Cloud, Azure DevOps, Travis CI, Circle CI
Languages of the repository
Azure DevOps Quality Gate Status not updating and stays in pending state
I’m currenlty having an issue with implementing a validation of the quality gate status in Azure DevOps for a monorepo being scanned by SonarCloud, the status stays in a pending state even if comments are applied to the PR from SonarCloud.
We are scanning multiple projects in each PR, what we do get if the quality gate passes is:
But as you see the status of the overall quality gate check is still pending, can someone at SonarSource check the backend logs and let me know if the API calls to Azure DevOps are generating any errors that might indicate what is causing this to fail, as it works fine for anything not in a monorepo.
You’ll need to remove the general one from your branch policies now that you have your project configured as a monorepo (which at some point in the past, probably wasn’t configured as such). When configured as a monorepo, a project has no “overall quality gate check” – but rather two separate ones, one for each project in the monorepo.
Thanks for the info, just for clarity then, I’m guessing the solution then is to configure multiple status checks for each project point to their path in the monorepo so only the projects getting built end up with a required status check?
If anyone has any suggestions or can point me to some kind of logs somewhere where I can diagnose this irritating issue that would be great.
Interesting discovery though, when no status check is added for the PR, SonarCloud can post the status fine, if I add a status check the status post from SonarCloud doesn’t appear in the list of statuses, the list contains all statuses sent to that PR even if the dont apply to it.
And thanks for the extra info, no the issue is when you set the status check (either optional or required), it sits there on a waiting status. But if I remove or disable the status check SonarCloud posts to the PR absolutely fine, albeit I can’t fail the PR if the quality gate doesn’t succeed.
Whats interesting is if i query the Azure DevOps PR statuses API I can see what statuses are posted to the PR, with the status check enabled the SonarCloud quality gate status isn’t in the output, take off the status check and it shows up in the list.
I’m wondering if there is anything in the SonarCloud side in the logs that would indicate either an issue your side or if i need to speak to MS about this.