Inconsistent results between runs

no. please find bellow the build options

steps:

  • task: VSBuild@1
    displayName: ‘Build solution SalesLink.sln’
    inputs:
    solution: ‘SalesLink\SalesLink.sln’
    vsVersion: 15.0
    platform: ‘Any CPU’
    configuration: Release

Hi @ghaouim

Can you try adding /p:RunAnalyzersDuringBuild=true to your VSBuild task parameters to see if that changes something ?

Thanks.

we will, as we don’t know what is causing the issue and cannot reproduce it systematically (random) we cannot confirm to you the problem is solved immediately

For sure, let’s go first at your assumption of not seeing each time the relevant SonarQube log for categorization.

are you still trying to understand why we are facing this random issue? I guess it should help to identify the root while giving a try to the workaround proposed.

Indeed.

Have done on two of our pipelines, so will see if that makes a difference.

@mickaelcaro
…and the first build with that flag missed a load of stuff that had been analysed previously :frowning:

(logs sent privately to @Alexandre_Holzhey )

Ironically, for the other pipeline, it found an extra 31 lines of code, even though it was working to the same check in…

HI @ghaouim and @RowlandShaw , could you please tell us how many agents are you using for build and also if you can manage the configuration? Additionally, @ghaouim can you provide us with the scanner logs for a good and a bad analysis (good = expected NCLOC, bad = unexpected NCLOC) (tell me if you want to send it in a private message)?

Thanks

For the build pipelines I’m reporting this with, I’m using two agents running on the same on-prem physical box; but I believe @ghaouim is seeing this across other product teams around our organisation, which use different on-prem agents/hosts for their builds

We have multiple agents running on the sane build machine.
Yes I can manage the configuration
For scanner logs, I do prefer to send it in private message.

Probably also worth being explicit here, but one of the side effects of this we’re experiencing on my team from the analysis not always covering everything is that a PR build is not always picking up issues, that then only materialise after merging into master

With a bit of further experimentation and analysis, it does seem to to be the case that the issue tends to manifest when multiple build agents are running concurrently on the same hardware - which suggests part of the process is escaping the build folder

Does the new sonar-scanner-msbuild 5.1.0 version solve the problem?

843 - SonarQube.Integration.ImportBefore.targets removal by TargetsUninstaller causes issues with Concurrent Analysis

Still seeing issues; most recently at 16:44 GMT on 5th March :frowning:

Hi @RowlandShaw

Can you make sure that your agents are running both Run Code Analysis and Prepapre Analysis configuration tasks to version 1.21.0, and also that the logs show correctly “SonarScanner for .NET 5.1.0” ?

Thanks.

they are all running the 5.1
looks like the problem is solved but we need your confirmation.

This is a first try to address the issue, yes.

I was too fast, we still have an issue
image image

can we plan a direct call which is part of our support contract. This issue is started taking infinite time and is impacting 696 projects. we cannot keep sending messages back and forward.

Thank you

any updates?