Quality gate hanging in Azure DevOps

In the last few days we’ve had PRs hang waiting on the quality gate. We’ve validated the PAT so that’s not the issue. I can see from both the background tasks and PR activity that Sonar is working. What I have noticed, and this may well be co-incidental, is that the name of the PRs in Sonar has changed between them working and hanging and this also seems to coincide with the a change in the server version from 8.0.0.78820 to 8.0.0.79696.

The PR name has changed from <PR number> - <PR title> to <PR number> - <feature branch name>. Clicking on the PR and then view in DevOps takes me to the feature, not the PR.

Org ID is “mercuryxteam”

Thanks

Hi,

Can you share the job log, please? I’m looking for the log starting from the analysis command, through to the hang/timeout, redacted as necessary.

 
Thx,
Ann

The build pipeline runs to completion and they are the only logs we are aware of. Attached the “SonarCloudAnalyze” and “SonarCloudPublish” steps with the repo and project name modified. This repo was last PR’d 22nd this year without issue, and twice in December without issue.

Thanks

17136 SonarCloudPublish.txt (1.3 KB)

17136 SonarCloudAnalyze.txt (28.3 KB)

Hi,

I’m confused about two things. First, this publish log doesn’t show anything hanging. Second, it does show this:

I would not expect to see either the server version or the SCM warning in there. Can you share your pipeline?

 
Thx,
Ann

Attached the template yml and repo specific yml

nuget template yml.txt (9.4 KB)

repo yaml.txt (716 Bytes)

Hi,

Thanks for the pipeline files. Nothing’s jumping out at me here except this in your publish step:

pollingTimeoutSec: '300'

How often do you see a timeout?

 
Thx,
Ann

I’m not aware of of any issues in the pipeline itself, certainly I PR every week without issue until this last week or so.

Hi,

Is this happening for every PR or only some of them? Are you using self-hosted runners or the platform’s?

 
Thx,
Ann

This is happening to every PR (that uses a Sonar quality gate) in the last couple of weeks. I’m told that we’re using self-hosted agents (VM scale set).

Hi,

Can you add sonar.verbose=true to the extra properties for your analysis and provide the log, redacted as necessary, please?

I’m not quite sure what it will show, because at this point I suspect you should probably talk to your network folks and make sure nothing is being blocked or timed-out on their end. But I think it’s an i we need to dot.

 
Ann

Infra will take a look at the network side of things, here are verbose logs for the last PR started.

SonarCloud Publish.txt (1.3 KB)

SonarCloudAnalyze.txt (547.9 KB)

SonarCloudPrepare.txt (11.2 KB)

Hi,

I’m still / again confused.

[INFO] SonarQube Cloud: Overall Quality Gate status: ok

I don’t see a failure here.

 
Ann

This is the problem, it all looks fine, but something clearly isn’t! I’ll speak to DevOps and Infra next week, maybe we need to raise this with MS.

We looked into this extensively, updated the tasks to @44, nothing makes a difference. When we look at the publish task you can clearly see it has received the analysis result and you can see this on the pipeline run too:

I’ve posted in the MS developer community, see if that gets us anywhere.

1 Like

Hi,

Let’s back up.

If the publish task is succeeding, and the pipeline has the result too… what part is it that’s hanging?

 
Thx,
Ann

This part:

It will say “Waiting” forever, normally it completes pretty much instantly once the repo build is done.

Hi,

I’ve flagged this for more expert eyes.

 
Ann

1 Like