Commit Graph
156 Commits
Author SHA1 Message Date
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
Ryan Ghadimi 9dc746ecd2 tests & releases 2026-01-16 09:44:57 +00:00
Salman Muin Kayser Chishti bb06c8e35a fix(cache): replace @azure/ms-rest-js with @azure/core-rest-pipeline
Remove abandoned @azure/ms-rest-js dependency which pulls in node-fetch@v2, causing punycode deprecation warnings on Node.js 24+.

The TransferProgressEvent type is now imported from @azure/core-rest-pipeline instead.
2025-12-10 11:23:06 +00:00
Ryan Ghadimi e518261d5f no need to resolve 2025-10-15 16:23:02 +01:00
Ryan Ghadimi 5b9a70063d lint 2025-10-15 16:23:02 +01:00
Ryan Ghadimi 89d5600fb7 new error state, tests to cover 2025-10-15 16:23:02 +01:00
Ryan Ghadimi 2a75926faf remove cache size limit 2025-10-15 16:23:02 +01:00
Salman Muin Kayser Chishti 5facceabcc linting 2025-09-04 15:24:57 +01:00
Salman Muin Kayser Chishti 194748dabb package updates 2025-09-04 15:15:02 +01:00
Salman Muin Kayser Chishti fff3a02570 Merge branch 'main' into salmanmkc/node24 2025-08-08 03:54:30 +01:00
Bassem Dghaidi da5f546157 Fix linter complaints 2025-08-07 03:49:51 -07:00
Salman Muin Kayser Chishti 7533af2e97 updates 2025-07-31 23:48:44 +01:00
Bassem Dghaidi 23733c502e Merge pull request #2100 from actions/copilot/fix-2099
Improve cache service availability determination and implement conditional error logging
2025-07-28 16:49:10 +02:00
copilot-swe-agent[bot]andLink- 780c52920e Fix v1 cache service to only check ACTIONS_CACHE_URL
Co-authored-by: Link- <568794+Link-@users.noreply.github.com>
2025-07-14 13:39:13 +00:00
copilot-swe-agent[bot]andLink- c0e1707545 Restore server error test and confirm logCacheError function removal
Co-authored-by: Link- <568794+Link-@users.noreply.github.com>
2025-07-14 13:01:02 +00:00
copilot-swe-agent[bot]andLink- 098b391e92 Complete PR feedback implementation: all cache tests passing
Co-authored-by: Link- <568794+Link-@users.noreply.github.com>
2025-07-14 12:26:40 +00:00
copilot-swe-agent[bot]andLink- 768c09e245 Implement 5xx server error detection and fix most cache tests
Co-authored-by: Link- <568794+Link-@users.noreply.github.com>
2025-07-14 12:23:44 +00:00
copilot-swe-agent[bot]andLink- 0632db1508 Update tests to expect warnings instead of errors for non-5xx cache failures
Co-authored-by: Link- <568794+Link-@users.noreply.github.com>
2025-07-14 12:07:37 +00:00
Bassem Dghaidi 355b96f648 Fix linting issues 2025-07-14 03:49:28 -07:00
Bassem Dghaidi 50df04cfa4 Fix logging of cache key and restore key matches 2025-07-14 03:45:17 -07:00
copilot-swe-agent[bot]andLink- 4b4a56d5f7 Fix tests to expect errors instead of warnings for cache failures
- Update restoreCacheV2.test.ts, restoreCache.test.ts, saveCacheV2.test.ts, and saveCache.test.ts
- Change test expectations from core.warning to core.error for cache operation failures
- All tests now pass successfully

Co-authored-by: Link- <568794+Link-@users.noreply.github.com>
2025-07-14 10:38:47 +00:00
copilot-swe-agent[bot]andLink- 6c9465b976 Improve cache service availability determination and change warnings to errors
- Update isFeatureAvailable() to leverage ACTIONS_CACHE_SERVICE_V2 feature flag
- For v2: check ACTIONS_RESULTS_URL availability
- For v1: check either ACTIONS_CACHE_URL or ACTIONS_RESULTS_URL availability
- Change warning logs to error logs for cache failures
- Add comprehensive tests covering all scenarios

Co-authored-by: Link- <568794+Link-@users.noreply.github.com>
2025-07-14 10:32:34 +00:00
Ryan Ghadimi 62997f4a4a alphabetically order them 2025-05-07 08:31:17 +00:00
Ryan Ghadimi fee58efe37 maybe this works instead 2025-05-06 20:22:05 +00:00
Ryan Ghadimi 7e000b8182 don't need that maybe 2025-05-06 20:08:50 +00:00
Ryan Ghadimi 61892208ae change url 2025-05-06 20:02:27 +00:00
Ryan Ghadimi 233b58ff4c add env variable for cache tests 2025-05-06 19:50:44 +00:00
JoannaaKL 4d0dc6ece5 Merge pull request #1994 from gitulisca-enterprise-cloud-testing/gitulisca/log-restore-request-version
Log cache version requested on debugging message
2025-03-17 17:58:16 +01:00
Art Leo 54ac8fc2b0 Log cache version requested 2025-03-15 10:13:43 +11:00
Salman Chishti 2e7002485c add encoding back with extra tests 2025-03-14 06:38:57 -07:00
Salman Chishti fb3958ba44 update ts docs 2025-03-13 04:47:49 -07:00
Salman Chishti b55f609ced PR feedback, back to simplified approach, no export on client as well 2025-03-13 04:23:45 -07:00
Salman Chishti c7ec9af3af Mask different situations, malformed URL, encoded, decoded, raw signatures, nested parameters, and moved to a utility file 2025-03-12 03:17:35 -07:00
Salman Chishti cd186258e8 masks the whole URL, update tests 2025-03-10 06:47:52 -07:00
Salman Chishti 00d0e25088 Instead of using utility method in core lib, use method in both twirp clients 2025-03-07 06:01:25 -08:00
Salman Chishti 0ba281d011 remove these changes 2025-03-06 14:31:21 -08:00
Salman Chishti 10e284a34d Add secret and signature masking for cache and artifact packages 2025-03-06 14:25:32 -08:00
Rob Herley c6b0a26648 cache: wrap create failures in ReserveCacheError 2025-02-25 12:49:08 -05:00
Rob Herley 516a802ae7 update mocks 2025-02-14 09:42:41 -05:00
Rob Herley 61f222d41c remove runtime dependency on twirp-ts 2025-01-27 17:52:55 +00:00
Bassem Dghaidi e51a94a67c Tune upload options 2024-12-02 07:32:33 -08:00
Bassem Dghaidi 19a33d23ef Fix linter complaints 2024-12-02 04:24:17 -08:00
Bassem Dghaidi fef5a9d9e5 Fix tests 2024-12-02 04:18:46 -08:00
Bassem Dghaidi f51d6a5578 Troubleshoot 2024-12-02 03:35:20 -08:00
Bassem Dghaidi b12049ae0c Add progress tracking for blob uploads 2024-12-02 02:33:27 -08:00
Bassem Dghaidi b1ea5b92cd Fix tests 2024-11-29 07:36:51 -08:00
Bassem Dghaidi ff642a18e3 Force use of Azure for restoreCacheV2 2024-11-28 07:42:07 -08:00
Bassem Dghaidi 3e095368f1 Refactor saveCacheV2 to use saveCache from cacheHttpClient 2024-11-28 07:22:01 -08:00
Bassem Dghaidi 10c2c22dd2 Respect download options for restore 2024-11-28 04:56:37 -08:00
Bassem Dghaidi ffe895ecd9 Linter fixes 2024-11-28 03:53:34 -08:00