- Azure DevOps, using private build agent on Windows 10
- Java is 64Bit Redhat OpenJDK-1.8.0.191
- Version SonarQube 7.6.0.21501 Developer
- SonarScanner Azure DevOps Tasks 4.5.1
I have a large code base and have successfully run SonarQube analysis against the branches
- Master
- feature/xxx
I create a personal branch for new work off the feature branch. Once the work was complete I try to do an Azure DevOps PR back into parent feature branch. This PR trigger Azure DevOps builds that include SonarQube analysis
For my main solution/build, when I do analysis of the PR into a parent branch the correct SonarQube.properties are automatically being set (source branch, target branch, PR ID) but the analysis task is failing with the following error
2019-02-07T10:54:00.9042997Z 10:54:00.893 INFO: Pull request 1444 for merge into feature/103908-Android-Athena-Views from fez/00000-test-sonarqube
2019-02-07T10:54:00.9167431Z 10:54:00.909 INFO: SCM collecting changed files in the branch
2019-02-07T10:54:00.9444610Z 10:54:00.940 DEBUG: readpipe [git, --version],E:\Build2\externals\git\cmd
2019-02-07T10:54:01.0959843Z 10:54:01.081 DEBUG: readpipe may return ‘git version 2.18.0.windows.1’
2019-02-07T10:54:01.0962988Z 10:54:01.081 DEBUG: remaining output:
2019-02-07T10:54:01.0966192Z
2019-02-07T10:54:01.1016652Z 10:54:01.097 DEBUG: readpipe [git, config, --system, --edit],E:\Build2\externals\git\cmd
2019-02-07T10:54:01.4085927Z 10:54:01.394 DEBUG: readpipe may return ‘E:/Build2/externals/git/mingw64/etc/gitconfig’
2019-02-07T10:54:01.4086969Z 10:54:01.394 DEBUG: remaining output:
2019-02-07T10:54:01.4087697Z
2019-02-07T10:54:01.6180391Z 10:54:01.612 INFO: ------------------------------------------------------------------------
2019-02-07T10:54:01.6180653Z 10:54:01.612 INFO: EXECUTION FAILURE
2019-02-07T10:54:01.6241067Z 10:54:01.612 INFO: ------------------------------------------------------------------------
2019-02-07T10:54:01.6243532Z 10:54:01.612 INFO: Total time: 5.718s
2019-02-07T10:54:01.6857184Z 10:54:01.675 INFO: Final Memory: 23M/226M
2019-02-07T10:54:01.6860225Z 10:54:01.675 INFO: ------------------------------------------------------------------------
2019-02-07T10:54:01.6871695Z ##[error]10:54:01.675 ERROR: Error during SonarQube Scanner execution
2019-02-07T10:54:01.6872021Z ##[debug]Processed: ##vso[task.logissue type=error;]10:54:01.675 ERROR: Error during SonarQube Scanner execution
2019-02-07T10:54:01.6872215Z 10:54:01.675 ERROR: Error during SonarQube Scanner execution
2019-02-07T10:54:01.6893042Z ##[error]java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.filesystem.ProjectFileIndexer
2019-02-07T10:54:01.6893899Z ##[debug]Processed: ##vso[task.logissue type=error;]java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.filesystem.ProjectFileIndexer
I have a second build triggered by the PR for a smaller solution in the same repo, on the same branch and against the same SonarQube project on the same private build agent. This works without any error, correctly detecting the change files
2019-02-07T10:17:59.8743226Z 10:17:59.861 INFO: Pull request 1444 for merge into feature/103908-Android-Athena-Views from fez/00000-test-sonarqube
2019-02-07T10:17:59.8890362Z 10:17:59.877 INFO: SCM collecting changed files in the branch
2019-02-07T10:17:59.9096338Z 10:17:59.908 DEBUG: readpipe [git, --version],E:\Build1\externals\git\cmd
2019-02-07T10:17:59.9726241Z 10:17:59.970 DEBUG: readpipe may return ‘git version 2.18.0.windows.1’
2019-02-07T10:17:59.9726895Z 10:17:59.970 DEBUG: remaining output:
2019-02-07T10:17:59.9726994Z
2019-02-07T10:17:59.9779568Z 10:17:59.970 DEBUG: readpipe [git, config, --system, --edit],E:\Build1\externals\git\cmd
2019-02-07T10:18:00.1401873Z 10:18:00.127 DEBUG: readpipe may return ‘E:/Build1/externals/git/mingw64/etc/gitconfig’
2019-02-07T10:18:00.1402441Z 10:18:00.127 DEBUG: remaining output:
2019-02-07T10:18:00.1402529Z
2019-02-07T10:18:00.2261927Z 10:18:00.220 DEBUG: Merge base sha1: 5a459451ae6f28fb1942bf75d75bd31a6793b043
2019-02-07T10:18:00.2582294Z 10:18:00.252 INFO: SCM collecting changed files in the branch (done) | time=375ms
2019-02-07T10:18:00.2582877Z 10:18:00.252 DEBUG: SCM reported 8 files changed in the branch
Is there any reason the PR check analysis should fail for the build of the larger solution?
Do I need to set some extra flag to allow more memory usage or something similar?
Note that the actual MSBUILD of the code completes without and errors prior to attempting to perform the SonarQube analysis