Must-share information (formatted with Markdown):
Intro and problem summary
My team is using sonar cloud with azure dev ops. We have a few different CI pipelines which utilize sonar cloud for code coverage and code smell analysis. We’ve been using sonar cloud for over a year. Suddenly over the past weekend our sonar cloud analysis tasks are no longer passing in our CI pipelines. We are getting the following errors in the pipelines. I do not suspect that our sonar cloud config was changed and our azure dev ops pipeline was not modified since the issue began.
How we run sonar cloud analysis
steps:
- task: SonarCloudAnalyze@1
displayName: 'Sonar Cloud Analysis'
Log sample from azure dev ops pipeline
---- START AZURE DEV OPS PIPELINE LOGS--------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 26.174s
INFO: Final Memory: 21M/77M
INFO: ------------------------------------------------------------------------
##[error]ERROR: Error during SonarScanner execution
ERROR: Could not find the pullrequest with key ‘XXXXX’
ERROR: Error during SonarScanner execution
ERROR: Could not find the pullrequest with key ‘XXXXX’
##[error]ERROR: Caused by: Error 404 on https://sonarcloud.io/api/alm_integration/show_pullrequest?project=SONAR_CLOUD_PROJECT_NAME&pullrequestKey=XXXXX : {“errors”:[{“msg”:“Unable to find the pullrequest with key \u0027XXXXX\u0027”}]}
ERROR:
ERROR: Caused by: Error 404 on https://sonarcloud.io/api/alm_integration/show_pullrequest?project=SONAR_CLOUD_PROJECT_NAME&pullrequestKey=XXXXX : {“errors”:[{“msg”:“Unable to find the pullrequest with key \u0027XXXXX\u0027”}]}
ERROR:
##[error]The SonarScanner did not complete successfully
The SonarScanner did not complete successfully
##[error]08:26:18.831 Post-processing failed. Exit code: 1
08:26:18.831 Post-processing failed. Exit code: 1
##[error]The process ‘/usr/bin/dotnet’ failed with exit code 1
Finishing: Sonar Cloud Analysis
---- END AZURE DEV OPS PIPELINE LOGS--------
Additional questions and answers:
-
which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) We are using sonarcloud.io which should be the latest version.
-
how is SonarQube deployed: I am not sure how to answer this question. Our azure dev ops pipeline runs our tests and provides LCOV and .xml files to sonar cloud for analysis.
-
what are you trying to achieve - have our pull requests pass our CI process which is failing due to sonar cloud analysis failures
-
what have you tried so far to achieve this – I checked sonar cloud to see if any of our settings changed over the weekend but wasn’t able to find anything different.
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!