Skip to content

[Fleet Monitor] petry-projects/.github-private β€” .github/workflows/sonarcloud.ymlΒ #699

Closed

Description

@don-petry

🟠 DEGRADED: petry-projects/.github-private / .github/workflows/sonarcloud.yml

Metric Value
Failure Rate 26.5% (49 / 185 runs)
Status DEGRADED
p50 Duration 78s
p95 Duration 288s
Successful Runs 136
Cancelled Runs 0

Workflow: .github/workflows/sonarcloud.yml

Last updated by Fleet Monitor run on 2026-06-14.
Threshold: failure rate > 10% over the monitored window.

Activity

  1. added
    health-checkAutomated health check report
    dev-leadFor dev-lead agent pickup
    fleet-trackerTracked by the Actions Fleet Monitor
    on Jun 14, 2026
  2. don-petry commented on Jun 14, 2026

    @don-petry
    CollaboratorAuthor

    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.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

    Test Command

    bash tests/test_sonarcloud_workflow.sh

  3. don-petry commented on Jun 14, 2026

    @don-petry
    CollaboratorAuthor

    Dev-Lead: Implementation Complete

    Root Cause

    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.
  4. added a commit that references this issue on Jun 14, 2026
  5. added a commit that references this issue on Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dev-leadFor dev-lead agent pickupfleet-trackerTracked by the Actions Fleet Monitorhealth-checkAutomated health check report

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions