Scanner command used when applicable (private details masked) the command runs just fine. The sonar just does not send the status correctly to the github pipeline
Languages of the repository: Javascript/Typescript
Error observed (wrap logs/code around with triple quotes ``` for proper formatting) NO ERROR
Steps to reproduce: It happens intermittently
Logs:
INFO Analysis report uploaded in 628ms
INFO ANALYSIS SUCCESSFUL, you can find the results at: [expected url]
INFO Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO More about the report processing at https://sonarcloud.io/api/ce/task?id=AZfBnBbw_smLuy_dJ8vj
INFO Analysis total time: 56.178 s
INFO SonarScanner Engine completed successfully
INFO EXECUTION SUCCESS
INFO Total time: 1:04.231s
I rarely encounter this error in SonarQube Cloud (in fact, I don’t recall seeing it before), but it appears that when the background task runs, it threw the following error:
Report for commit 'SHA' can’t be processed: a newer report has already been processed, and processing older reports is not supported. The last processed report was for commit 'SHA'
Notably, both SHAs are identical in this case.
Could it be that there are multiple workflows triggering SonarQube Cloud analysis simultaneously for the same commit? This might result in this error occurring if two reports for the same commit are being processed concurrently or in quick succession.
Thank you for the context. We do not have sonar running twice on PRs. The workflow has been working just fine for months with this exact setup.
Perhaps Github Actions was having some issue at the time. In one of the two cases recently, another workflow on the same PR was shown to be running 5 times for an unknown reason. This did not show for the sonar step or workflow that contained the sonar step.
The other time, it worked just fine on a rerun and we just moved on. I will track this and see if it happens again.