SonarCloud | Digging deeper | Background tasks

Was this page helpful?

On this page

Start FreeLog in

Background tasks

The processing of the scanner results is called a background task.

What happens after the scanner is done analyzing?

Analysis is not complete until the relevant background task has been completed. Even though the SonarScanner's log shows EXECUTION SUCCESS, the analysis results will not be visible in the SonarCloud project until the background task has been completed. After a SonarScanner has finished analyzing your code, the result of the analysis (sources, issues, metrics) - the analysis report - is sent to SonarCloud server for final processing by the compute engine. Analysis reports are queued and processed serially.

At the project level, when there is a pending analysis report waiting to be consumed, you can see a "pending" notification in the header, next to the date of the most recently completed analysis.

Project administrators can see the tasks for a project at Administration > Background Tasks.

How do I know when analysis report processing fails?

Background tasks usually succeed, but sometimes unusual circumstances cause processing to fail. Examples include:

  • Running out of memory while processing a report from a very large project
  • Hitting a clash between the key of an existing module or project and one in the report

If that happens, the failed status displays on the project homepage, but that requires someone to notice it. You can also choose to be notified by email when background tasks fail - either on a project by project basis, or globally, on all projects where you have administration rights in the Notifications section of your profile.

How do I diagnose a failing background task?

For each analysis report, there is a dropdown menu allowing you to access the scanner context that shows you the Scanner's configuration at the moment when the code scan was run.

If processing failed for the task, an additional option is available: "Show Error Details", to get the technical details of why the background task processing failed.

How do I cancel a pending analysis report?

Administrators can cancel the processing of a pending task by clicking:

  • on the red 'x' available on each line of a pending task
  • on the red "bulk cancel" option next to the pending jobs count. This button cancels all pending tasks.

Once processing has begun on a report, it's too late to cancel it.

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARLINT, SONARQUBE, SONARCLOUD, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License