Could not find the pullrequest with key ‘10’

Hey y’all!
I’m getting below error for pull request (Azure DevOps using Github repository)

INFO: Load project pull requests
INFO: Load project pull requests (done) | time=106ms
INFO: Load branch configuration
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 32.319s
INFO: Final Memory: 7M/30M
INFO: ------------------------------------------------------------------------
##[error]ERROR: Error during SonarScanner execution
ERROR: Error during SonarScanner execution
##[error]ERROR: Could not find the pullrequest with key ‘29’
ERROR: Caused by: Error 404 on https://sonarcloud.io/api/alm_integration/show_pullrequest?project=hortohome_LoanManager&pullrequestKey=29 : {“errors”:[{“msg”:“Requested resource wasn’t found on Azure DevOps.”,“reason”:“AZURE_DEVOPS_UNABLE_TO_FETCH_REQUESTED_RESOURCE”}]}
ERROR:
ERROR: Could not find the pullrequest with key ‘29’
ERROR: Caused by: Error 404 on https://sonarcloud.io/api/alm_integration/show_pullrequest?project=hortohome_LoanManager&pullrequestKey=29 : {“errors”:[{“msg”:“Requested resource wasn’t found on Azure DevOps.”,“reason”:“AZURE_DEVOPS_UNABLE_TO_FETCH_REQUESTED_RESOURCE”}]}
ERROR:
##[error]The SonarScanner did not complete successfully
The SonarScanner did not complete successfully
##[error]17:26:14.35 Post-processing failed. Exit code: 1
17:26:14.35 Post-processing failed. Exit code: 1
##[error]The process ‘/usr/bin/dotnet’ failed with exit code 1

I’m not facing any error while doing new commits to the same branches. For commits the analysis work very well.

I had uninsntalled and so installed SonarCloud in github apps and in service connections for azure devops, but I’m facing the same problem.

  • The project is public on GitHub, Azure DevOps and SonarCloud;
  • The problem is happening with pull request to and for any branch;
  • The pull requests exist on GitHub.

ps: mow I realized that the same problem is happening for all projects in my organization.

Hi @brunovitorprado and welcome to the community.

Given the logs, it looks like our system look for your PR on Azure DevOps instead of GitHub. You should register and create your organization based on “where your code” is. Can you confirmed that you are currently logging in using Azure DevOps ? If yes, you should switch to GitHub instead to setup everything on SonarCloud.

HTH,
Mickaël

I’m confused. I have another project with the same configurations and it worked well until some days ago.

I’m using a CI script, a pipeline created on azure devops, and it had worked well for months.
I need to be looged in sonarcloud to configure it? If i connect with GithHub, azure devops will be able to run the analyze task from sonarcloud in the pipeline?

Thanks a lot.
I logged with github account and setup my repositories.
I also had configured the token from sonarcloud into azure devops pipelines all is working well again.

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