Mismatch between SonarQube server state and API response after PR reanalysis in CI/CD pipeline

2 seconds seems like an awfully short time. You can check how long your background tasks typically take to process by checking the background tasks.

You can also add sonar.qualitygate.wait=true as an analysis parameter to not allow the scan process to finish until the background task processing is completed, but this will also fail your pipelines if your Quality Gate has failed.

2 Likes