Commit Graph
531 Commits
Author SHA1 Message Date
Bassem Dghaidi 8d7a442e42 Merge pull request #2502 from actions/cache-release-guide
Document @actions/cache release process
2026-09-28 13:15:48 +02:00
Bassem DghaidiandCopilot 1d5a9db258 Document @actions/cache release process
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-28 13:04:42 +02:00
Bassem Dghaidi b2f21e13f9 Merge pull request #2500 from actions/cache-v6.3.0-release
Cache v6.3.0 release
2026-09-28 12:21:00 +02:00
Bassem DghaidiandCopilot fb50c36db8 Keep cache Azure dependencies compatible with Node 20
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-25 18:28:41 +02:00
Bassem DghaidiandCopilot 312c7d23c2 Keep cache Azure dependencies compatible with Node 20
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-25 18:27:08 +02:00
Bassem DghaidiandCopilot f8b8b7e5a5 Keep cache Azure dependencies compatible with Node 20
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-25 18:25:40 +02:00
Bassem DghaidiandCopilot 5472e0e5c8 Keep cache Azure dependencies compatible with Node 20
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-25 18:23:48 +02:00
Bassem DghaidiandCopilot 56decd0766 Add @actions/cache 5.3.0 release notes
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-25 18:10:50 +02:00
Bassem DghaidiandCopilot f6fee859a4 Add @actions/cache 5.3.0 release notes
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-25 18:09:51 +02:00
Bassem DghaidiandCopilot 91900dbc1b Match local @actions/cache release notes
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-25 17:55:06 +02:00
Bassem DghaidiandCopilot 7c69745573 Correct @actions/cache release notes
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-25 17:54:30 +02:00
Bassem DghaidiandCopilot 94e94ff3be Release @actions/cache 6.3.0
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-25 17:53:35 +02:00
Bassem Dghaidi 8cf6f18201 Merge pull request #2497 from qmuntal/fix/cache-windows-bsdtar-isolation
fix(cache): isolate Windows BSD tar temporary files
2026-09-25 15:22:59 +02:00
qmuntal 3607dcfa49 fix(cache): make tar scratch cleanup best-effort
Log scratch-directory cleanup failures without replacing a successful
archive read or the original tool error. Keep scratch ownership in
execReadCommands and cover both outcomes for extraction and listing.
2026-09-17 17:04:23 +02:00
qmuntal cd705bb67f refactor(cache): scope tar scratch directories to reads
Keep execCommands as a plain executor that honors its cwd argument. Move
scratch-directory allocation and cleanup into a shared list/extract
helper, leaving archive creation on the caller-supplied directory.
2026-09-17 16:55:25 +02:00
qmuntal fce8715913 chore(cache): minimize tar isolation diff
Restore the existing helper layout and separate test cases rather than
bundling unrelated consolidation with the bug fix. Leave archive creation
unchanged and retain only the read isolation, necessary path handling,
and regression coverage.
2026-09-17 15:53:20 +02:00
qmuntal dd137a579c refactor(cache): consolidate tar fallback handling and tests
Share the Windows BSD tar/zstd predicate and prepare archive and workspace
arguments once per command. Parameterize duplicate BSD-tar read tests and
use the real temporary-directory utilities in the concurrency fixture.

Retain the existing concurrency, path-handling, and failure coverage.
2026-09-17 15:47:36 +02:00
qmuntal 90977320aa test(cache): align tar concurrency test filename 2026-09-17 15:36:35 +02:00
qmuntal da266fa6fd fix(cache): isolate Windows BSD tar temporary files
Run Windows BSD tar/zstd extraction and listing in private temporary
directories. Concurrent operations previously overwrote cache.tar in the
process working directory and could extract the wrong archive without
reporting an error. Debug listings during cache saves have the same race.

Resolve and quote archive and workspace paths before changing the child
working directory, and remove scratch files on success and failure.
Leave GNU tar, gzip, and the cache archive format unchanged.

Add deterministic regression tests for concurrent reads, relative paths
with spaces, and cleanup after failures in either subprocess.
2026-09-17 15:27:15 +02:00
Philip GaiandCopilot Autofix powered by AI 8d05a01e45 feat(cache): add cache-mode client behavior (read-denied warning + ACTIONS_CACHE_MODE skip) (#2447)
* feat(cache): surface cache read-denied as a distinct restore warning

Mirror the existing cache write-denied handling on the restore path. When
the receiver refuses a download URL because the run's token has no readable
cache scopes, it returns a twirp PermissionDenied (HTTP 403). The twirp
client wraps that 403 in a generic Error, so the stable 'cache read denied:'
prefix is embedded in the message rather than at the start.

- Add CACHE_READ_DENIED_PREFIX and CacheReadDeniedError
- Dispatch on the prefix in the restoreCacheV2 catch block (V2 only), log a
  policy-specific warning, and report a cache miss so the run continues
- Add a test mirroring the write-denied coverage

* chore(cache): trim comments, bump to 6.2.0, add RELEASES entry

* refactor(cache): dispatch read-denied by error name to mirror write path

Re-throw CacheReadDeniedError from an inner try/catch around
GetCacheEntryDownloadURL and dispatch on typedError.name in the outer catch,
matching how saveCacheV2 handles CacheWriteDeniedError.

* feat(cache): handle read-denied on the v1 restore path

Extend the read-denied handling to Cache Service v1 so GHES (which forces v1
via _apis/artifactcache) is covered when read-scope enforcement ships there.

- Surface the receiver's error body message from getCacheEntry instead of a
  generic status-code error, so the cache read denied: prefix reaches callers
- Re-throw CacheReadDeniedError from restoreCacheV1 and dispatch on it in the
  outer catch, mirroring restoreCacheV2 and the write-denied v1 handling
- Add a v1 read-denied test

* refactor(cache): only surface receiver body for read-denied on v1

* test(cache): assert getCacheEntry only surfaces body for read-denied

* test(cache): cover non-read-denied getCacheEntry passthrough on v1

* refactor(cache): share read-denied prefix via constants to avoid drift

* feat(cache): skip restore/save per ACTIONS_CACHE_MODE

* test(cache): expand ACTIONS_CACHE_MODE skip coverage across v1/v2 and unknown modes

* fix copilot pr feedback

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* docs(cache): remove internal reference from cache-mode comment

* test(cache): merge redundant cache-mode skip tests and simplify read-denied handling

Address PR review feedback:
- Merge the duplicate restore/save skip test.each blocks into single blocks parametrized over ACTIONS_CACHE_SERVICE_V2.
- Drop the redundant CacheReadDeniedError catch arms; the typed error is not an HttpClientError so it already falls through to a non-fatal warning.
- Clarify why read-denied classification happens both in getCacheEntry and cache.ts (dependency-free internal module cannot import the typed error).

* refactor(cache): drop redundant CacheWriteDeniedError catch arms

Mirror the read-denied simplification on the save path. CacheWriteDeniedError
is not an HttpClientError and its name does not match the ReserveCacheError
arm, so it falls through to the same non-fatal warning. Logging behavior is
unchanged (warns, never fails the run) and the exported type is still thrown
internally for consumers and tests. Also refresh stale doc wording.

* test(cache): collapse redundant restore getCacheEntry-failure tests

The two restoreCache tests exercised the identical warning + cache-miss path
now that read-denied is no longer reclassified in the catch, so merge them into
one. The read-denied prefix detection that actually branches on the message is
covered by getCacheEntry tests in cacheHttpClient.test.ts.

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-13 10:03:16 -05:00
Jason Ginchereau 480b99fb38 Bump cache package to v6.1.0, update RELEASES.md (#2436) 2026-06-17 11:25:12 -10:00
Jason Ginchereau b175b31648 Handle cache write error due to read-only token 2026-06-16 08:03:28 -10:00
Jason Ginchereau 359fe7deed Audit fix packages/cache 2026-06-11 17:24:11 -07:00
Jason Ginchereau 66801604fb Adit fix, address copilot comments 2026-06-11 17:17:55 -07:00
Jason Ginchereau c99fedd87a Handle cache write error due to read-only token 2026-06-11 17:02:12 -07:00
Joshua Brooks 17c9708982 Merge pull request #2393 from actions/samirat/update_minor_dependency_versions
Update minor versions of cache and artifact dependencies
2026-05-07 15:59:39 -04:00
Joshua Brooks c2bd8f1a98 Bump toolkit version, add release notes 2026-05-01 17:38:16 +00:00
Joshua Brooks 692639d142 Audit npm packages 2026-05-01 16:33:28 +00:00
Joshua Brooks 1aafa41eea Update minor versions of cache and artifact dependencies 2026-05-01 16:27:55 +00:00
Zachary Taylor 0ed300edae Merge pull request #2323 from actions/zaataylor-update-artifact-storage-err-msg
Update artifact storage error message
2026-02-26 14:37:38 -05:00
Zachary Taylor c355f598ae Update UsageError in cache 2026-02-26 14:31:12 -05:00
Daniel Kennedy f0055b449b @actions/cache: convert to an ESM module (#2275)
* `@actions/cache`: convert to an ESM module

* Update the fixture to ESM syntax

* Update the cache workflows

* Bump `@actions/glob` to `0.6.1`

* Fix awaiting in the cache unit tests

* Fix a type issues in contracts

* Export the `DownloadOptions`/`UploadOptions` like before

* More cache test fixes

* Make the cache units tests better

* Add some more logging

* Add retries to restore-cache.mjs
2026-01-29 14:23:32 -05:00
Daniel Kennedy 298e1df765 Bump @actions/glob to 0.5.1 in @actions/cache 2026-01-27 15:43:44 -05:00
Daniel Kennedy b356064971 Bump @actions/http-client and @actions/github on all packages 2026-01-27 13:31:31 -05:00
Ryan Ghadimi 1a03c0e6e8 Merge pull request #2243 from GhadimiR/main
Don't retry 429s returned from the cache service
2026-01-16 10:43:35 +00:00
Ryan Ghadimi 1f51e29c64 Add comment for rate limiting handling
Added a comment regarding rate limiting and retry behavior.
2026-01-16 10:26:45 +00:00
Ryan GhadimiandBassem Dghaidi 84637c3cc0 Update packages/cache/RELEASES.md
Co-authored-by: Bassem Dghaidi <568794+Link-@users.noreply.github.com>
2026-01-16 10:25:44 +00:00
Ryan Ghadimi 5400c9e292 New error type for cache RL 2026-01-16 10:00:15 +00:00
Ryan Ghadimi 717aface57 update release doc 2026-01-16 09:51:21 +00:00
Ryan Ghadimi e3ebd136a4 bump pkg 2026-01-16 09:46:28 +00:00
Ryan Ghadimi 9dc746ecd2 tests & releases 2026-01-16 09:44:57 +00:00
Ryan Ghadimi a09633bc31 Add handling for 429s from cache service 2026-01-14 17:01:59 +00:00
copilot-swe-agent[bot]andTingluoHuang ad2490e451 Verify changes with tests - all package-specific tests passing
Co-authored-by: TingluoHuang <1750815+TingluoHuang@users.noreply.github.com>
2026-01-07 22:03:56 +00:00
copilot-swe-agent[bot]andTingluoHuang c03ff60231 Update all packages to use @actions/http-client@^3.0.1 and bump patch versions
Co-authored-by: TingluoHuang <1750815+TingluoHuang@users.noreply.github.com>
2026-01-07 21:55:41 +00:00
copilot-swe-agent[bot] 3eb780180a Initial plan 2026-01-07 21:51:58 +00:00
Tingluo Huang 7e40caef03 Merge pull request #2231 from actions/copilot/prepare-http-client-release
Release @actions/http-client v3.0.1
2026-01-07 15:35:32 -05:00
copilot-swe-agent[bot] 322682c900 Initial plan 2026-01-07 18:02:29 +00:00
Tingluo Huang b00d35a3d5 Merge pull request #2229 from actions/copilot/extend-user-agent-http-requests
Extend user-agent with orchestration ID and add default user-agent
2026-01-07 10:42:56 -05:00
copilot-swe-agent[bot]andTingluoHuang 5394209a56 Revert unrelated version bumps in package-lock.json files
Co-authored-by: TingluoHuang <1750815+TingluoHuang@users.noreply.github.com>
2026-01-06 17:50:28 +00:00
copilot-swe-agent[bot]andTingluoHuang deca5e58a1 Add ACTIONS_ORCHESTRATION_ID support to http-client user-agent
Co-authored-by: TingluoHuang <1750815+TingluoHuang@users.noreply.github.com>
2026-01-06 15:32:55 +00:00