Error observed “Component “removed title” of pull request ‘4059’ not found”
The build in Bitbucket on our PR shows as failed, but when we follow the link to Sonarcloud we see the listed error. Yes, I am logged in and am the admin of the project. The logs in Jenkins show the build as success. This is not an old build. I am trying to access this within 30 minutes of completion of the build. This is the first time I have had this issue so curious if others have seen this and if there is a solution.
The json response is from Jenkins reporting the Sonarscan results. The response shows success but there seems to be no record of it in Sonarcloud despite being a PR run that was only a few minutes old.
Thanks for the screenshot. It helps. So now I want to go back to the OP:
Are you saying the build job failed? As in: PR analysis was not submitted to SonarCloud? Or are you saying that your pipeline shows that the PR failed the Qualtiy Gate?
The screenshot is what you see when you click the link in your analysis logs? What happens if you look at the project’s list of PRs? Do you see the PR there?
No it is not present in the project’s list of PRs, it is basically a ghost. The PR shows the failed build in Bitbucket along with other passed builds for the same PR. We are in a monorepo, so it ran 40 scans based on the affected parts of the codebase. 37 PRs passed and are accessible in Sonarcloud, but there are 3 scans that show as failed. Those 3 scan builds are unable to be found or accessed in Sonarcloud despite our Jenkins logs showing the successful scan and the links in Bitbucket.
The build agent log says analysis succeeded, but it doesn’t show up at the server. It’s time to check the Adminstration → Background Tasks. At this point, I’m assuming the analysis failed in server-side processing. So you should see a failed task, and find the error under the row’s dots menu.
Awesome! Thank you @ganncamp , this is my first post and you have been really helpful and I’ve learned something new. Next time I’ll be able to jump straight to the Background Task analysis. Interested to see what your team has to say about the error.
I checked the analysis “AYqt7RAAoT0_oNQedQEN” and saw that there is an error : Component has been deleted by end-user during analysis, which may happen if the PR is merged and the branch is deleted during analysis.
Well, in this case the PR was still open and could not be merged because the CI system considered the Sonarcloud scan run to be failed which blocks the merge. Could it be something else?
Firstly I’m sorry to hear that this issue is causing a lot of pain with your processes, I hope that we can help you get to the bottom of this.
Are you able to share with me details for your sonar-project.properties files? We can also message privately if necessary. Also if you are able to share some more recent analysis ids I can take a look into these to see if we are still dealing with the same issue as previously. As you are running many projects within a singular monorepo it could be that we are seeing failures with parallel processing (we would need to investigate this and the additional ids could help here).
Finally, can I check, if is it always the same jobs which are failing or does it change project?
At any given time, we might be seeing a dozen or so PRs, each currently running upwards of 100 Sonarcloud jobs for the same repository and roughly the same projects. The pipeline invokes sonar-scanner via Nx, and does so in parallel in batches of 10. So, that could be as many as 120 concurrent Sonarcloud builds for the same repository.
The projects that fail appear to vary, though there are a handful that fail more frequently than others.
Thank you for the clarification, are you able to send me some ids from recently failing jobs? I can then try and link them to a batch. I see that previously in the conversation Dwayne was able to supply one of these. I would like to assess a few of the recent failures. Ideally several from one run and several from a separate run.
Separately I am trying to find information from the team incase this is a known issue.