Skip to content

ci: don't fail build when SonarQube scan step errors - #1873

Closed
firecow wants to merge 2 commits into
masterfrom
fix/sonar-step-non-blocking
Closed

ci: don't fail build when SonarQube scan step errors#1873
firecow wants to merge 2 commits into
masterfrom
fix/sonar-step-non-blocking

Conversation

@firecow

@firecow firecow commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Summary

The SonarQube scan runs as the final step of the test job and intermittently returns HTTP 403 while downloading the scanner CLI from binaries.sonarsource.com, failing the whole master build even though tests passed (seen across multiple re-runs of run 26933995675).

It is a reporting step — the quality gate is surfaced via its own SonarCloud Code Analysis check — so a transient scanner-download error should not block the build. Marked the step continue-on-error: true.

This does not mask test failures: bun run coverage runs in the prior step and still fails the job if any test fails.

Test plan

  • YAML parses; step has continue-on-error: true
  • .github/workflows/ is ignored by yamllint config, so no lint impact

Summary by cubic

Make the SonarQube scan non-blocking and cache the SonarScanner CLI to avoid flaky 403 downloads that fail builds. Set continue-on-error: true, pin scannerVersion: 8.1.0.6389, and persist ${{ runner.tool_cache }}/sonar-scanner-cli; tests still gate the job and the quality gate is reported via its own check.

Written for commit 637a89a. Summary will update on new commits.

Review in cubic

The SonarQube scan runs as the final step of the test job and intermittently
returns HTTP 403 while downloading the scanner CLI from binaries.sonarsource.com,
failing the whole build even though tests passed. It is a reporting step and the
quality gate is reported via its own check, so mark it continue-on-error.
@firecow firecow self-assigned this Jun 4, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

The scan action downloads the scanner CLI from binaries.sonarsource.com on
every run, which intermittently returns HTTP 403 and fails the build. The
action checks the tool-cache first (tc.find) and only downloads on a miss, so
persisting that directory with actions/cache makes every run after the first
restore the scanner and skip the CDN entirely. scannerVersion is pinned to keep
the cache key in sync.
@firecow firecow closed this Jun 4, 2026
@firecow
firecow deleted the fix/sonar-step-non-blocking branch June 4, 2026 06:40
@sonarqubecloud

sonarqubecloud Bot commented Jun 4, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant