I am using sonarsource/sonarqube-quality-gate-action@master action in PR GitHub action as one of the step. This is taking lot of time to analyse. like an hour and so.
I use java + maven
Following are the details:
SonarQube version: 220.127.116.11730
I’d recommend doing some further troubleshooting to determine whether it’s actually an issue with the behavior of the
sonarqube-quality-gate-action or if another factor is causing that step of your workflow to be stuck waiting. Does this issue happen consistently or sporadically?
I’ve also experienced this behavior before. However, typically the quality gate action itself is working as expected. The two root causes I’ve personally encountered are:
- the project analysis task is running long/still running in SonarQube
- there’s a backlog of pending project analysis tasks on my SonarQube instance and the one for the project in question hasn’t run yet
Both resulted in a longer run time for my quality gate step because it was waiting until there was an actual quality gate status to report. Once I resolved these root issues, the quality gate step completed in a timely manner.
Have you looked at the Background Tasks page on your SonarQube instance to review the details of your project analysis? This can be helpful for identifying any trends in duration time or reviewing any warnings that might impact the project analysis. Next time you encounter this issue, I’d recommend looking at the Background Tasks page as it’s happening so you can determine if a backlog of pending tasks is contributing to the issue.
Here’s the background task documentation.
Thank you Schyler, you are right when checked, the mentioned issue is occurring because of the background task taking time. Appreciate the support. Thanks again.