I’m new to SonarCloud, just implemented it in our build, though I haven’t been able to get a successful build yet due to the build timing out at 60 minutes - specifically at the dotnet build step. Without the SonarCloud tasks, the dotnet build task takes around 10 minutes.
I’ve tried adding the env variable listed above:
- task: DotNetCoreCLI@2
displayName: "dotnet build"
arguments: "--configuration $(Build.Configuration)"
But there’s been seemingly no effect.
Did you have the same problem without Concurrent Execution? If so I suggest you take a look at The SonarSource guide for investigating the performance of .NET analysis and that should help you understand the problem. If this just happened with Current Execution on please send us some logs as described in the article.
Yes, we’re seeing this issue with concurrent execution enabled. Unfortunately, due to it timing out, I don’t believe it’ll output the execution times as it never finishes. As we’re using a private project and a private repo on Azure Devops on Azure hosted machines, we’re set at a hard 60 minute timeout, which we’re consistently hitting.
Is there any documentation/suggestions on where to begin stripping rules out to see if we can at least get a working build and work up from there?
I should note that it does seem as though it’s analyzing each project more than once - I have 12 occurences roughly 20 minutes into the build of
(MyProject.csproj) Project processed successfully
Firstly can you confirm that you don’t have the timeout problem with concurrent execution set to false? It would be interesting to know if concurrent execution is causing the problem. If that’s the case can you send us logs of a concurrent run please?
If the problem is with analyzing projects multiple times please refer to this section in the article I suggested
Would it be fine to PM you the logs? Working with a private repo - but more than happy to share logs. I followed your link with the following the following snippets:
dotnet sonarscanner begin /k:"<My Private Project Key>" /o:"<My Private Organization>" /d:sonar.login="<My Token>" /d:sonar.host.url="https://sonarcloud.io"
dotnet build "C:\Users\tyler.jackson\source\repos\<My Private Project>\<My Private Project>.sln" -p:reportanalyzer=true -v:diag > "C:\Users\tyler.jackson\Documents\AnalyzerTimes\build_logs.txt"
dotnet sonarscanner end /d:sonar.login="<My Token>"
From this, I got a file of roughly 8.6 million lines with no occurrences of SonarAnalyzer or references to the total analyzation time.
I’ve moved this into a new topic as it may not be related to concurrent execution. I’ll PM you and you can reply with the logs