fix(sonar): tolerate a failed scan without breaking the job [NOJIRA] - #330
Open
Casperhr wants to merge 1 commit into
Open
fix(sonar): tolerate a failed scan without breaking the job [NOJIRA]#330Casperhr wants to merge 1 commit into
Casperhr wants to merge 1 commit into
Conversation
continue-on-error is re-evaluated when its step fails, in a context where `inputs` is not available. The expression rendered '' and the job died with "The template is not valid ... Unexpected value ''" instead of tolerating the failure, so sonar-non-blocking did the opposite of its name the moment Sonar actually failed. Latent until then, which is why it only surfaced now that the scanner is hitting StreamResetException pulling its plugins over the tailnet. Tolerate both Sonar steps unconditionally and re-raise in a following step, whose `if` does evaluate `inputs`, so sonar-non-blocking: false still blocks. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
joscdk
approved these changes
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Sets
continue-on-error: trueunconditionally on the two Sonar steps inpull-request-kotlin.yml, and adds a following step that re-raises the failure whensonar-non-blockingis false — preserving the input's meaning without putting an expression incontinue-on-error.Why?
continue-on-error: ${{ inputs.sonar-non-blocking }}is re-evaluated when the step fails, in a context whereinputsis not available. It renders''and the job dies withThe template is not valid ... (Line: 256, Col: 28): Unexpected value ''— sosonar-non-blockingdid the exact opposite of its name at the only moment it mattered. This was latent until now, since the expression is only re-evaluated on failure; it surfaced because the scanner started failing withokhttp3.internal.http2.StreamResetExceptionwhile downloading its plugins over the tailnet, which is currently blocking otherwise-green PRs (e.g. monta-app/service-search#260, where tests and coverage pass in full).Context
Both the tailnet wait step and the upload step carried the same defect, so both are fixed; there are now no expression-valued
continue-on-errorkeys left in the workflow. The underlying SonarQube plugin-download failure is a separate infra issue and still worth chasing — this change only stops it from taking whole jobs down with an unrelated template error.🤖 Generated with Claude Code