Skip to content

CI: make coverage upload and cache save non-fatal - #599

Closed
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:ci-make-coverage-and-cache-nonfatal
Closed

ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:ci-make-coverage-and-cache-nonfatal

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Please ignore until reviewed by @ChrisRackauckas. Opened as a draft.

Problem

Recent CI runs are broadly red, but the failures are almost entirely infrastructure, not test failures. Investigated by inspecting per-step conclusions on master 72fa309:

Job (on master HEAD) Failing step julia-runtest
SciMLBase.jl/Core codecov/codecov-action@v6 ✅ passed
DiffEqBase.jl/Core codecov/codecov-action@v6 ✅ passed
OrdinaryDiffEq.jl/Core codecov/codecov-action@v6 ✅ passed
DiffEqBase.jl/Downstream2 codecov/codecov-action@v6 ✅ passed
GPU Tests codecov/codecov-action@v6 ✅ passed
Tests - nopre - Julia 1 Post Run julia-actions/cache@v3 ✅ passed

Two root causes:

  1. Codecov upload failing the job. codecov/codecov-action@v6 ran with fail_ci_if_error: true in Tests.yml and Downstream.yml, so any upload failure (token issues, rate limits, a codecov outage, or the empty CODECOV_TOKEN on fork PRs) failed the whole job after tests had already passed. GPU.yml already used fail_ci_if_error: false — this brings the others in line.
  2. Cache save failing the job. julia-actions/cache@v3's save (post) step fails to authenticate with the cache backend on some self-hosted runners (Server failed to authenticate the request / ENOENT: …/cache.tzst), failing the job after tests passed.

Fix

Coverage upload and cache save are reporting/infrastructure steps; neither should turn a green test run red.

  • Tests.yml, Downstream.yml: codecov → fail_ci_if_error: false + continue-on-error: true.
  • GPU.yml: codecov → add continue-on-error: true (fail_ci_if_error: false alone is insufficient — the action still exits non-zero with an empty token, as seen on fork PRs).
  • Tests.yml: julia-actions/cache@v3 → continue-on-error: true.

Test steps are untouched — a real test failure still fails CI. This only stops infra/reporting steps from masquerading as test failures.

Scope / not covered here

  • SciMLSensitivity.jl/Core6 fails in the actual test step (Load this and run the downstream tests), not codecov/cache — a genuine downstream failure that is independent of this change and needs separate triage.
  • The Documentation job's coverage step lives in the reusable SciML/.github/.github/workflows/documentation.yml@v1, not this repo, so it is out of scope here.

YAML validated locally (parses; continue-on-error/fail_ci_if_error settings confirmed on every codecov/cache step). Cannot run GitHub Actions locally — the next CI run on this PR will confirm the infra steps no longer fail jobs.

🤖 Generated with Claude Code

Almost every red check on recent runs was infrastructure, not a test failure:

- `codecov/codecov-action@v6` ran with `fail_ci_if_error: true` in Tests.yml and
  Downstream.yml, so a coverage-upload failure (token, rate limit, codecov
  outage, or the empty CODECOV_TOKEN on fork PRs) failed the whole job even
  though `julia-runtest` had already passed. Verified on master `72fa309`:
  SciMLBase.jl/Core, DiffEqBase.jl/Core, OrdinaryDiffEq.jl/Core and
  DiffEqBase.jl/Downstream2 all failed only on the codecov step.
- `julia-actions/cache@v3`'s save (post) step fails to authenticate with the
  cache backend on some self-hosted runners ("Server failed to authenticate the
  request" / "ENOENT: cache.tzst"), failing the job after the tests passed.

Coverage upload and cache save are reporting/infrastructure steps; a failure in
either must not turn a green test run red. This sets `fail_ci_if_error: false`
and adds `continue-on-error: true` to the codecov steps (mirroring the existing
GPU.yml setting, and guarding the residual non-zero exit the action returns with
an empty token), and `continue-on-error: true` to the cache step. Test steps are
unchanged, so a real test failure still fails CI.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
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.

2 participants