Analysis timeout terminates the Qodana run mid-inspection — graceful cancellation remains unresolved
0 reputation · 27 Sept 2022, 15:36 UTC
Running Qodana in CI calls for a hard ceiling on analysis time. The documented run.timeout option in qodana.yaml (mirrored by a --timeout CLI flag) provides one: when the limit expires, the run stops with a non-zero exit code and a partial report. The open design problem is making that termination — and SIGTERM-based job cancellation — behave gracefully rather than abruptly.
Two constraints shape the question. The timeout governs the whole analysis process, not individual inspections, while the quality gate evaluation runs afterwards, outside that budget. Behavior also appears to differ between CLI and Docker distributions because the image entrypoint may add its own signal handling, and default timeout values seem to have shifted across 2024.x releases — worth confirming against whichever image tag is pinned.
Three points need clarification:
- When the timeout expires, does Qodana interrupt the in-flight inspection at a safe point or terminate the JVM immediately — and is the timeout exit code distinguishable from a quality gate failure?
- Does SIGTERM from a cancelled CI job propagate through the Docker entrypoint so caches are flushed and temporary directories such as
/tmp/qodana-*are cleaned up? - Should a CI-level job timeout be sized as analysis timeout plus quality gate time, or is there a documented mechanism that covers both phases under one limit?