Hi there,
We are experiencing extremely slow SonarCloud analysis performance, details below.
- ALM used: Azure DevOps
- CI system used: Azure DevOps YAML Pipeline
- Scanner command used when applicable:
Prepare:
steps:
- task: SonarCloudPrepare@1
displayName: SonarCloud Prepare
inputs:
SonarCloud: SonarCloud
organization: #REDACTED#
scannerMode: MSBuild
projectKey: #REDACTED#
projectName: #REDACTED#
extraProperties: |
sonar.cs.opencover.reportsPaths=$(Agent.TempDirectory)/**/coverage.opencover.xml
sonar.javascript.lcov.reportPaths=$(Build.SourcesDirectory)/websites/#REDACTED#/coverage/lcov.info
sonar.coverage.exclusions=**/*.spec.ts,**/*.stories.ts,*.config.ts,**/*.config.ts
Analyze:
steps:
- task: SonarCloudAnalyze@1
displayName: SonarCloud Analyze
- Languages of the repository: C#, Typescript, HTML, Javascript, XML, CSS, PL/SQL
- Error observed:
2022-08-17T13:41:31.5029433Z INFO: Blaming files using native implementation
2022-08-17T14:06:07.3517578Z INFO: **(There's 146 of these blank info lines)**
2022-08-17T14:06:13.7654888Z INFO: Blaming files using native implementation (done) | time=1482259ms
2022-08-17T14:06:13.7895102Z INFO: SCM Publisher 0/1023 source files have been analyzed (done) | time=1484110ms
2022-08-17T14:06:13.7897822Z WARN: Missing blame information for the following files:
**lists 1022 files**
2022-08-17T14:06:13.9486558Z WARN: This may lead to missing/broken features in SonarCloud
This seems to happen only on our trunk build, with our PR build we see SonarCloud take 3-4 minutes.
I set up a separate pipeline to run off a branch to troubleshoot this and I don’t get the same behavior. The branch is running a duplicated version of the main pipeline so the projects being built are exactly the same, just running against a branch instead of the main branch (which we call trunk)
Logs from branch build (note: there are no blank INFO logs on this build):
2022-08-18T09:24:24.8436782Z INFO: Blaming files using native implementation
2022-08-18T09:24:24.9941261Z INFO: Blaming files using native implementation (done) | time=157ms
2022-08-18T09:24:25.0120688Z INFO: SCM Publisher 0/2 source files have been analyzed (done) | time=828ms
2022-08-18T09:24:25.0126371Z WARN: Missing blame information for the following files:
**Lists only 2 files**
2022-08-18T09:24:25.0131935Z WARN: This may lead to missing/broken features in SonarCloud
I believe the files listed under “Missing blame information for the following files” are just what has changed between previous head and the commit that this build is running against.