Skip to content

ci(nightly): 👷 stop go-module cache double-restore (CI-1) - #100

Merged
konih merged 1 commit into
mainfrom
worktree-ci-1-nightly-cache
Jul 10, 2026
Merged

konih merged 1 commit into
mainfrom
worktree-ci-1-nightly-cache

Conversation

@konih

@konih konih commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

What

Add cache: false to the setup-go step in the shared .github/actions/go-cache composite action.

Why

The weekly Nightly workflow's integration job has failed 5 consecutive scheduled runs (#28774033391 07-06, #28355638103 06-29, #27941013613 06-22, and prior), each at ~1m20s before any test runs.

Root cause is infra, not code:

  • actions/setup-go@v6 defaults cache: true, which restores ~/go/pkg/mod + ~/.cache/go-build.
  • The composite then runs an explicit actions/cache@v5 over the same two paths (keyed on go.sum).
  • The second tar extraction unpacks over the already-populated module cache and fails:
    /usr/bin/tar: ../../go/pkg/mod/go-simpler.org/[email protected]/...: Cannot open: File exists
    

Push/PR CI, Integration, and E2E are all green on real commits — main is not broken — but the nightly safety-net was non-functional.

Fix

Disable setup-go's built-in cache so the explicit actions/cache step (with its go.sum key + restore-keys) is the single source of truth. Minimal, one input on one shared composite.

Blast radius

go-cache is used by 9 workflows (ci, integration, e2e, preflight, codeql, release-gate, sonarcloud, vulncheck, nightly). The change only removes a redundant duplicate restore; the explicit cache continues to serve all of them.

Verification

  • actionlint runs in the preflight job (not installed locally); YAML validated locally.
  • Post-merge proof: dispatch a Nightly run (workflow_dispatch) and confirm the integration job restores the cache without the tar error and proceeds to tests.

Closes CI-1 (audit 2026-07-10).

setup-go@v6 defaults cache:true, restoring ~/go/pkg/mod + ~/.cache/go-build,
then the explicit actions/cache step restores the same paths again. The second
tar extraction fails with 'Cannot open: File exists', which broke the weekly
Nightly integration job before any test ran (5 consecutive failures). Set
cache:false on setup-go so the explicit actions/cache (keyed on go.sum) owns
the module/build cache. Shared go-cache composite: same fix applies to all
workflows that use it (CI, integration, e2e, preflight, codeql, ...).
@konih
konih merged commit c1a9916 into main Jul 10, 2026
14 checks passed
konih added a commit that referenced this pull request Jul 10, 2026
…ks (#101)

The ci:integration task (nightly's integration lane) inherited the global
CGO_ENABLED=0 and exported it into run-ci-integration.sh and the nested
task test:integration, so go test -race failed 'requires cgo'. The direct
Integration workflow uses task test:integration (CGO=1) and stayed green,
which masked this until #100 (go-cache fix) unblocked the cache-restore step
and the weekly Nightly integration job reached the test phase.

Mirror the existing ci:e2e task, which already overrides CGO_ENABLED=1.
@konih
konih deleted the worktree-ci-1-nightly-cache branch July 11, 2026 07:40
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