Issue with quality gate implementation in azure pipelines not updating gate

During the latest week something has happend to our implementation of sonarcloud as a quality gateway, build(azure) and quality gate(sonar in sonar) are ok but the pull request in azure still isnt updated after 8 hours, the quality gate is simply “waiting” and isnt updated and is currently holding all PR for our organization.

Sonar Cloud Report is passed and is ok
Azure build is ok.
so the laste one i guess is the gateway checks that dont checkout 100%, what i can see from the integration is that everthing in the sonar job is executed and passed.

is this a known issue, or is it local problem in our end?

Hi,

Can you share your background task id that corresponds to the analysis that was not reported in the Azure? You can find it in Administration → Background tasks

Best,
Marcin

is it this info your refering to?, found it in the generate analysis task in the azure integrations
INFO: More about the report processing at https://sonarcloud.io/api/ce/task?id=AXi20wcAxRVfppi9JTYx

did some more investigation
i checked in azure the status api, where i could see on a old commit that worked, that it had alot of statuses, but when i checked the commit of the one that i did a pullrequest to that status api call was empty so conclussion of that either the status calls dont come in the azure (Status - Get (Azure DevOps Build) | Microsoft Docs)

or your report status isnt reporting to correct place.

its been ongoing now for a week(almost).

everything says ok on both sonarcloud dashboard and build is ok, but the quality gate connected to sonarcloud service is not working as intended since its stuck on pending.

Update: this happends for all our analysis tasks in azure, not specific project/build.

I took a look, and it seems that your branch is detected as the master branch which is why it is not updating anything in the Azure Dev Ops. Can you double-check if you add required parameters as for example sonar.pullrequest.key? Do you see the results of the analysis you showed me in the SonarCloud UI as the pull request?

Best,
Marcin

sonar.pullrequest.key seems like we dont set that during the analysis pipline, is that something that has changed? because we havent had that property set since we setup the sonarcloud analytics pipelines.

and it has been working until like 3,4 days ago.

here is the prep task which i guess is the one were we provide the properties.

Hi @Marten_Andersson ,

If you are using SonarCloudPrepare task, setting the properties is not required. Can you share the logs of the analysis (if possible, set the flag sonar.verbose to true)? I created a private thread for that.

Best,
Marcin

Problem solved in private thread. Root cause was not valid PAT set on the project level.

1 Like