ERROR: Could not find the pullrequest with key xxxx

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)!

Hi, we were able to resolve the problem due to an expired token.

Some feedback: the error message is misleading. HTTP 404 is not a good response code here. It makes me think I am requesting a resource that is not there. Sonar cloud should say 401 for unauthorized. That would help me diagnose the problem better.

Hi,

Welcome to the community!

I’m glad you worked through this. I just want to follow up by saying that that 404 is coming straight from your DevOps platform, and we’re just passing it through. And, I agree that we could do a better job here. I’m going to ping internally. (Without holding my breath. :sweat_smile:)

 
Ann

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.