Commit Graph

134 Commits (dbb7d1f4bd5bf4744a09d6c14cf76de4d8ad04bf)

Author SHA1 Message Date
Jasperhino dbb7d1f4bd fix: always land in GCS, backfill GitHub hits, remember paths for the post step
Three gaps let a cache key live only in the GitHub cache with GCS
configured, and one of them stopped the pnpm store (1.6 GB) from ever
reaching GCS in cula-platform:

- A hit served by the GitHub fallback counted as an exact match, so the
  post step never saved it. Once GCS missed a key a single time, the
  GitHub copy satisfied every later job and GCS never got the key.
  Restore now records which backend answered (State.CacheSource); on a
  GitHub hit the save writes the entry to GCS, without a second GitHub
  save that would only fail on the existing entry.

- The post step of an action nested inside composite actions cannot see
  sibling step outputs, so `path: ${{ steps.x.outputs.y }}` arrived empty
  there ("Input required and not supplied: path") and the save was
  skipped. Restore now records the resolved paths (State.CachePaths) and
  the save falls back to them when the input is empty.

- saveCache logged "falling back to GitHub cache" on an empty GCS result
  and then returned without doing so. The fallback now runs in both the
  empty-result and the thrown-error case, unless the caller opted out.

The restore/save tests mocked core.getState with positional
mockImplementationOnce chains that depended on the number and order of
reads (and leaked across tests); they are keyed by state name now.

dist/ rebuilt with `npm run build`.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y5UfALF3nKcwCLWPikbnJn
6 days ago
Jasperhino 2f176eae24 Allow configured env fallback for GCS bucket 4 months ago
Jasperhino 993ce21c74 Add env fallback for GCS cache bucket 4 months ago
Jasperhino 5ed4dd939d Clean up GCS fork: minimal changeset vs upstream actions/cache
Realign the fork so it diffs from upstream actions/cache only by the GCS
cache backend, instead of carrying unrelated downgrades and deletions.

- Restore package.json/package-lock.json to upstream 5.0.4 deps; the fork
  had downgraded to 4.2.x. Re-add @google-cloud/storage (gcsCache.ts needs it).
- Rebuild dist/ against the restored deps so it bundles the real GCS client
  rather than a stale build against downgraded deps.
- Restore deleted upstream files: 7 workflow YAMLs, .github/CODEOWNERS,
  .licensed.yml. (To be disabled in the fork, not removed.)
- Revert action.yml/restore/save manifests to upstream name/description/
  author; keep only the gcs-bucket/gcs-path-prefix inputs as the fork diff.
- auto-tag.yml: track upstream's highest semver release tag, moving both the
  exact-version tag and the major alias, instead of force-pinning v1.
- Remove checkout/ composite action; relocated to Cula-Technologies/checkout.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 months ago
Jasperhino be02de94c3 gcsCache: return matched cache key, not gcs path
@actions/cache restoreCache contract returns the matched key (primary or
restore) so callers can compare to primaryKey for cache-hit. Our wrapper
was returning the full gcs object path, so restoreImpl.ts always set
cache-hit=false → every job ran pnpm install --frozen-lockfile on top of
a restored node_modules, burning ~34s per job for nothing.

findFileOnGCS now returns { key, path }; outer wrapper returns the key.
5 months ago
Jasperhino d751c19fb0 Add GCS cache backend with GitHub fallback
Port GCS support from danySam/gcs-cache. When gcs-bucket input is set,
cache to Google Cloud Storage via Application Default Credentials; else
fall back to GitHub's cache service transparently.

- New inputs: gcs-bucket, gcs-path-prefix (default: github-cache)
- New src/utils/gcsCache.ts wraps @actions/cache restore/save
- restoreImpl/saveImpl swap @actions/cache import for local wrapper
- Adds @google-cloud/storage ^7.16.0, bumps typescript to ^5.8.3
- Regenerated dist/ via npm run build

Skipped: upstream workflow removals, README/examples/RELEASES churn,
licensed/codeql config, GCS integration-test workflow.
5 months ago
Yang Cao 619aeb1606 npm run build generated dist files 5 months ago
Bassem Dghaidi 1865903e1b Update dependencies & patch security vulnerabilities 6 months ago
Bassem Dghaidi 345d5c2f76
Add 5.0.3 builds 7 months ago
Ryan Ghadimi b22231e43d Build 8 months ago
Salman Muin Kayser Chishti 74de208dcf fix: update @actions/cache to ^5.0.1 for Node.js 24 punycode fix
Updates @actions/cache to version 5.0.1 which includes the @azure/storage-blob
update that fixes the punycode deprecation warning on Node.js 24.
9 months ago
Salman Muin Kayser Chishti b0f846b50b fix: update @actions/cache with storage-blob fix for Node.js 24 punycode deprecation 9 months ago
Salman Muin Kayser Chishti 6b1bb4d720 chore: rebuild dist with @actions/cache v5.0.0 9 months ago
Salman Muin Kayser Chishti 26b91aff41 Latest dist with core changes 9 months ago
Salman Muin Kayser Chishti d3cff5bce3 Update with core 2.0.1 which has exec 2.0.0 9 months ago
Salman Muin Kayser Chishti a9d8a74065 chore: rebuild with @actions/cache v5.0.0
Uses updated cache package that removes @azure/ms-rest-js dependency to fix Node 24 punycode deprecation warning.
9 months ago
Salman Muin Kayser Chishti aa3f06a4c2 Build with @actions/cache v5.0.0 9 months ago
Salman Muin Kayser Chishti b24583c7e6 chore: use local @actions/core, exec, io packages 9 months ago
Salman Muin Kayser Chishti 5650dc9d27 chore: rebuild dist with local @actions/cache (core v2, exec v2) 9 months ago
Salman Muin Kayser Chishti 4803712a90 Build dist files for Node 24 11 months ago
Salman Muin Kayser Chishti 5868a9c4a9 Update cache to use local cache package and Node 24 support
- Use local cache package with file:../packages/cache instead of published version
- Update all action.yml files to use node24 runtime
- Update dependencies to support Node 24 (@types/node@24.1.0)
- Rebuild dist files with local cache package
- Add engines field requiring node >=24
12 months ago
Salman Muin Kayser Chishti d6693585a1 license and compiled 1 year ago
Salman Muin Kayser Chishti 941dee2241 Merge branch 'main' into pr/1630 1 year ago
Bassem Dghaidi 374a27f269 Prepare release 4.2.4 1 year ago
Bassem Dghaidi e7b6a9cc9d @protobuf-ts/plugin to dev dependencies 1 year ago
Salman Chishti 94b8944262 update to node24 1 year ago
Salman Chishti 76d40dd347 Update to use the latest version of the cache package to obfuscate the SAS 2 years ago
Salman Chishti 76dd5eb692 update cache with main 2 years ago
Salman Chishti 8c80c27c5e new package 2 years ago
Salman Chishti 45cfd0e7ff updates 2 years ago
Salman Chishti edd449b9cf updated cache with latest changes 2 years ago
Salman Chishti 0576707e37 latest test before pr 2 years ago
Salman Chishti 3105dc9754 update 2 years ago
Salman Chishti 9450d42d15 mask 2 years ago
Salman Chishti 7d05b27fb9 update cache package to mask whole sas to the end of the line 2 years ago
Salman Chishti 507b84c6a6 artifact changes 2 years ago
Salman Chishti f248408e15 type 2 years ago
Salman Chishti c30eb5542e debugging 2 years ago
Salman Chishti 5b6ae99d8b mask whole url 2 years ago
Salman Chishti eca7c65a55 changed 2 years ago
Salman Chishti 1b5d75f5cf add changes 2 years ago
Rob Herley da26677639
bump @actions/cache to v4.0.2, prep for v4.2.2 release 2 years ago
Rob Herley 710893c236
bump @actions/cache to v4.0.1 2 years ago
Bassem Dghaidi b109c12f3b Upgrade @actions/core to 1.11.1 and other deps 2 years ago
Bassem Dghaidi b7d227d702 Upgrade @vercel/ncc to 0.38.3 2 years ago
Bassem Dghaidi 4bc41c01bd Upgrade @actions/cache to 4.0.0 2 years ago
John Wesley Walker III 71d826cc33 appease the linter 2 years ago
John Wesley Walker III 25942a73ac ran `npm run build` 2 years ago
bethanyj28 d2c84da363 update @actions/cache 3 years ago
Tatyana Kostromskaya d0be34d544 Fix dist 3 years ago