Skip to content

Add a maintainer-run workflow to check 3rd-party integration connectivity (SonarCloud/Codecov) #208

Closed

Description

@AndreasIgel

Problem

When a Sonar/Codecov step fails, it is hard to tell a bad/expired token apart from a code or network problem. This actually happened: the fork Sonar publish failed with HTTP 403 ... check SONAR_TOKEN — the whole pipeline (approval → checkout → restore) worked, only the token was rejected by SonarCloud. A full CI run is a slow, noisy way to discover that.

Proposal

Add a small maintainer-only workflow_dispatch workflow (e.g. integrations-check.yml) that verifies the configured integration secrets and endpoint reachability in a few seconds, without building or running any project/PR code:

  • SonarCloud — confirm SONAR_TOKEN is present and valid via GET https://sonarcloud.io/api/authentication/validate (token sent as HTTP basic auth; its value is never printed). Fails clearly on 403/"valid":false.
  • Codecov — confirm CODECOV_TOKEN is present and that the Codecov API is reachable. (Codecov upload tokens have no public "validate" endpoint, so this is presence + reachability, which is stated honestly in the output.)

An input lets the maintainer pick all / sonarcloud / codecov.

Why this is safe

  • workflow_dispatch can only be started by users with write access, from the default branch — so it is inherently maintainer-gated and never runs for fork PRs.
  • It executes no build and no PR-supplied code; it only performs authenticated HTTP checks. Token values are never echoed.

Not in scope

  • It does not replace the fork fork-ci environment approval for the actual Sonar publish; it is purely a diagnostic.

Activity

  1. AndreasIgel commented on Jul 20, 2026

    @AndreasIgel
    CollaboratorAuthor

    Reopening after the first live run of integrations-check.yml (https://github.com/java-helpers/simple-builders/actions/workflows/integrations-check.yml). Findings + fixes (PR #209):

    1. SonarCloud token looks invalid — the check reports the token as not working. This is a maintainer action: verify/rotate SONAR_TOKEN in SonarCloud (valid, correct org/project). Same root cause as the earlier fork-Sonar HTTP 403.

    2. Codecov must not be blocked by a failing Sonar check — the two checks were steps in one job, so a failing Sonar step aborted the job before Codecov ran. Fixed: split into two independent jobs (sonarcloud, codecov) that run in parallel, each gated by the target input.

    3. Codecov returns 202 (accepted/pending), not 200/201 — the create-commit handshake is queued asynchronously. Fixed: the check now treats 202 as success (a 202 still requires a valid, authorized upload token).

    Remaining open item is maintainer-side only: (1) above — fix the SonarCloud token, then re-run the workflow to confirm both legs pass.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions