Skip to content

fix(ci): build workspace per job instead of sharing dist via cache#193

Closed
merencia wants to merge 1 commit into
masterfrom
fix/ci-cache-key
Closed

fix(ci): build workspace per job instead of sharing dist via cache#193
merencia wants to merge 1 commit into
masterfrom
fix/ci-cache-key

Conversation

@merencia

Copy link
Copy Markdown
Contributor

Supersedes #192 (that PR object desynced from its branch head).

Problem

Master CI went red after merging #189/#190/#191 (all individually green, docs/metadata-only changes). The build job passed, but lint/test/integration-test failed with missing build outputs (unresolved types; Cannot find module .../sidequest/dist/index.cjs).

Root cause

The setup action cached build outputs (**/dist) and the downstream jobs (which do not build) restored them via actions/cache. That cross-job handoff is unreliable: the build job saved the cache successfully, yet a lint job starting ~8s later got Cache not found for the same key (GitHub Actions cache read-after-write inconsistency, surfacing after runners were force-migrated to Node 24). A miss left the job with no dist.

Fix

Stop sharing dist across jobs: cache dependencies only (keyed on the lockfile), and have setup always run yarn build so every job has a freshly built workspace (fast via Turbo). Also switches deprecated --frozen-lockfile to --immutable.

Validation

This PR's CI exercises the change; merging produces a master commit whose CI uses the fix.

…cache

Master CI went red after merging #189/#190/#191 (all individually green,
docs/metadata-only changes). The build job passed, but lint/test/integration
failed with missing build outputs (unresolved types; 'Cannot find module
.../sidequest/dist/index.cjs').

Root cause: the setup action cached build outputs (**/dist) and the downstream
jobs (which do not build) restored them via actions/cache. That cross-job cache
handoff is unreliable: even after the build job saved the cache successfully,
a downstream job starting seconds later got a cache miss (GitHub Actions cache
read-after-write inconsistency, surfacing now that runners were force-migrated
to Node 24). A miss left the job with no dist, so type-aware lint and the tests
broke.

Fix: stop sharing dist across jobs. Cache only dependencies, keyed on the
lockfile (stable, high reuse), and have setup always run 'yarn build' so every
job has a freshly built workspace. Builds are fast via Turbo. Also switches the
deprecated --frozen-lockfile to --immutable.
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