You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix the ~26.5% failure rate of sonarcloud.yml by stopping the SonarScanner CLI from downloading its own JRE (which intermittently returns HTTP 403 Forbidden from scanner.sonarcloud.io/jres/...) and instead pinning it to the JDK already installed by setup-java.
Root Cause
Failed runs (8β19s) all die with:
HttpException: GET https://scanner.sonarcloud.io/jres/OpenJDK21U-jre_x64_linux_hotspot_21.0.9_10.tar.gz failed with HTTP 403 Forbidden
The workflow sets up JDK 21 and passes -Dsonar.scanner.javaExePath=..., but never sets -Dsonar.scanner.skipJreProvisioning=true, so the scanner still tries (and intermittently fails) to fetch a bundled JRE.
Implementation Checklist
.github/workflows/sonarcloud.yml β add -Dsonar.scanner.skipJreProvisioning=true to the SonarCloud Scan args
tests/test_sonarcloud_workflow.sh β new regression test asserting the scan args pin the JRE to the setup-java JDK
.github/workflows/test.yml β run the new test in CI
Tests to Write
tests/test_sonarcloud_workflow.sh β fails when skipJreProvisioning=true (or javaExePath) is absent from the scan args
Failed sonarcloud.yml runs (all 8β19s) died during scanner bootstrap with:
HttpException: GET https://scanner.sonarcloud.io/jres/OpenJDK21U-jre_x64_linux_hotspot_21.0.9_10.tar.gz failed with HTTP 403 Forbidden
The workflow installs JDK 21 via setup-java and passes -Dsonar.scanner.javaExePath=..., but javaExePath alone does not stop the SonarScanner CLI from provisioning its own bundled JRE. That download to scanner.sonarcloud.io intermittently returns HTTP 403, which accounted for the ~26.5% failure rate.
Fix
Added -Dsonar.scanner.skipJreProvisioning=true to the scan args so the scanner reuses the JDK already installed by setup-java instead of downloading one β removing the flaky network dependency entirely.
Plan Execution
.github/workflows/sonarcloud.yml β added -Dsonar.scanner.skipJreProvisioning=true to scan args
tests/test_sonarcloud_workflow.sh β new regression test (red β green)
.github/workflows/test.yml β runs the new test in CI
Test Results
=== RED (before fix) ===
FAIL: .github/workflows/sonarcloud.yml SonarCloud Scan args must set -Dsonar.scanner.skipJreProvisioning=true
=== GREEN (after fix) ===
PASS: .github/workflows/sonarcloud.yml pins the scanner JRE to the setup-java JDK
=== existing test.yml suite ===
copilot_chat OK
list_prs_sort OK
=== dev-lead-lint.sh ===
[lint] shellcheck on 51 file(s)...
[lint] validating 4 agent profile(s)...
[lint] all checks passed
shellcheck tests/test_sonarcloud_workflow.sh β OK
yq parse sonarcloud.yml / test.yml β valid
Files Changed
.github/workflows/sonarcloud.yml: add -Dsonar.scanner.skipJreProvisioning=true to the SonarCloud Scan args.
tests/test_sonarcloud_workflow.sh: regression guard asserting the scan args set both skipJreProvisioning=true and javaExePath.
.github/workflows/test.yml: invoke the new test.
Notes
The resolved (folded-scalar) args are verified to join as a single space-separated line: -Dsonar.scanner.skipJreProvisioning=true -Dsonar.scanner.javaExePath=.../bin/java.
yq is preinstalled on GitHub ubuntu-latest runners; the test guards with a command -v yq check and exits non-zero (never false-passes) if absent.
The existing if: env.SONAR_TOKEN != '' guard (fork-PR skip) is unchanged.
Activity
don-petry commentedon Jun 14, 2026
Dev-Lead Implementation Plan
Issue: #699 β [Fleet Monitor] petry-projects/.github-private β .github/workflows/sonarcloud.yml
Scope
Fix the ~26.5% failure rate of
sonarcloud.ymlby stopping the SonarScanner CLI from downloading its own JRE (which intermittently returnsHTTP 403 Forbiddenfromscanner.sonarcloud.io/jres/...) and instead pinning it to the JDK already installed bysetup-java.Root Cause
Failed runs (8β19s) all die with:
The workflow sets up JDK 21 and passes
-Dsonar.scanner.javaExePath=..., but never sets-Dsonar.scanner.skipJreProvisioning=true, so the scanner still tries (and intermittently fails) to fetch a bundled JRE.Implementation Checklist
.github/workflows/sonarcloud.ymlβ add-Dsonar.scanner.skipJreProvisioning=trueto the SonarCloud Scanargstests/test_sonarcloud_workflow.shβ new regression test asserting the scan args pin the JRE to the setup-java JDK.github/workflows/test.ymlβ run the new test in CITests to Write
tests/test_sonarcloud_workflow.shβ fails whenskipJreProvisioning=true(orjavaExePath) is absent from the scan argsTest Command
bash tests/test_sonarcloud_workflow.shdon-petry commentedon Jun 14, 2026
Dev-Lead: Implementation Complete
Root Cause
Failed
sonarcloud.ymlruns (all 8β19s) died during scanner bootstrap with:The workflow installs JDK 21 via
setup-javaand passes-Dsonar.scanner.javaExePath=..., butjavaExePathalone does not stop the SonarScanner CLI from provisioning its own bundled JRE. That download toscanner.sonarcloud.iointermittently returns HTTP 403, which accounted for the ~26.5% failure rate.Fix
Added
-Dsonar.scanner.skipJreProvisioning=trueto the scan args so the scanner reuses the JDK already installed bysetup-javainstead of downloading one β removing the flaky network dependency entirely.Plan Execution
.github/workflows/sonarcloud.ymlβ added-Dsonar.scanner.skipJreProvisioning=trueto scanargstests/test_sonarcloud_workflow.shβ new regression test (red β green).github/workflows/test.ymlβ runs the new test in CITest Results
Files Changed
.github/workflows/sonarcloud.yml: add-Dsonar.scanner.skipJreProvisioning=trueto the SonarCloud Scan args.tests/test_sonarcloud_workflow.sh: regression guard asserting the scan args set bothskipJreProvisioning=trueandjavaExePath..github/workflows/test.yml: invoke the new test.Notes
-Dsonar.scanner.skipJreProvisioning=true -Dsonar.scanner.javaExePath=.../bin/java.yqis preinstalled on GitHububuntu-latestrunners; the test guards with acommand -v yqcheck and exits non-zero (never false-passes) if absent.if: env.SONAR_TOKEN != ''guard (fork-PR skip) is unchanged.feat: implement issue #699 β [Fleet Monitor] petry-projects/.github-pβ¦
feat: implement issue #699 β [Fleet Monitor] petry-projects/.github-pβ¦