Question
SonarQube Scanner: Missing Timeout Configuration
Cig Cedar
0 reputation · 16 Nov 2024, 07:00 UTC
67.9K views0
SonarQube Scanner: Missing Timeout Configuration
The primary goal is to enforce a maximum duration for a SonarQube analysis so that CI pipelines can fail fast and resources are not tied up indefinitely.
Current Constraints
- The Scanner does not expose a built‑in timeout setting; analyses run until completion or server shutdown.
- Only the Enterprise Edition offers an
/api/analysis/abortendpoint, and it requires the Administer System permission. - There is no documented way to notify a CI system when a scan is cancelled, complicating graceful degradation.
Unresolved Decision
Whether a per‑project or global timeout should be supported, and if the abort API could be exposed to lower‑privileged users or integrated into the open‑source scanner, remains undecided.
Specific Questions
- What configuration, if any, can be added to the SonarQube Scanner to enforce a maximum analysis duration?
- Can the abort endpoint be accessed programmatically from CI scripts, and what permissions are required?
- Is there a mechanism to notify the CI pipeline of a scanner cancellation, allowing the build to handle it gracefully?