Hello,
This might be linked with other posts I’ve seen on the forum (eg. this one or this other one), but just in case.
Our renovate instance picked up last week an update for the Github Actions sonarqube-scan-action
from v2
to v3
.
We’re using the action as below:
runs:
using: composite
steps:
<REDACTED>
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@v2
with:
args: >
-Dsonar.projectKey=${{ inputs.sonar_project }}
env:
SONAR_TOKEN: ${{ inputs.sonar_token }}
SONAR_HOST_URL: ${{ inputs.sonar_host_url }}
<REDACTED>
The action was running successfully so far, but after switching to v3
, we ended up with the following error:
Run sonarsource/sonarqube-scan-action@v3
/usr/bin/docker run --name <REDACTED> --label <REDACTED> --workdir /github/workspace --rm -e "SONAR_TOKEN" -e "SONAR_HOST_URL" <REDACTED> --entrypoint "/entrypoint.sh" -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" end":"/github/workspace" <REDACTED> -Dsonar.projectKey=<REDACTED>
09:10:11.906 INFO Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
09:10:11.909 INFO Project root configuration file: NONE
09:10:11.921 INFO SonarScanner CLI 6.1.0.4477
09:10:11.922 INFO Java 17.0.11 Eclipse Adoptium (64-bit)
09:10:11.922 INFO Linux 6.5.0-1025-azure amd64
09:10:11.944 INFO User cache: /opt/sonar-scanner/.sonar/cache
09:10:12.871 INFO EXECUTION FAILURE
09:10:12.872 INFO Total time: 0.968s
09:10:12.872 ERROR Error during SonarScanner CLI execution
java.lang.IllegalStateException: Failed to get server version
at org.sonarsource.scanner.lib.ScannerEngineBootstrapper.getServerVersion(ScannerEngineBootstrapper.java:148)
at org.sonarsource.scanner.lib.ScannerEngineBootstrapper.bootstrap(ScannerEngineBootstrapper.java:112)
at org.sonarsource.scanner.cli.Main.analyze(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:63)
Caused by: java.lang.IllegalStateException: Error status returned by url [***api/v2/analysis/version]: 404
at org.sonarsource.scanner.lib.internal.http.ServerConnection.callUrl(ServerConnection.java:182)
at org.sonarsource.scanner.lib.internal.http.ServerConnection.callApi(ServerConnection.java:145)
at org.sonarsource.scanner.lib.internal.http.ServerConnection.callRestApi(ServerConnection.java:123)
at org.sonarsource.scanner.lib.ScannerEngineBootstrapper.getServerVersion(ScannerEngineBootstrapper.java:143)
... 3 common frames omitted
09:10:12.873 ERROR
09:10:12.873 ERROR Re-run SonarScanner CLI using the -X switch to enable full debug logging.
Note that switching back to v2
reverts to a successful run.
Our sonarqube instance is public and behind HTTPS.
Has there is no release notes or README
for v3
so far, should we consider v3
experimental until further notice ? Is there a change I might have missed in the documentation ?
Thanks in advance for your help.