1
0
Fork 0
toolkit/packages
Enes Cakir 932ba2e7b2 [cache] Use Azure SDK to restore cache always if explicitly set to true
With the new cache service v2, `restoreCacheV2` [^1] and `saveCacheV2`
[^2] now explicitly use the Azure SDK for blob operations.

The cacheHttpClient uses the Azure SDK to save the cache if the
`useAzureSdk` option is set to true. [^3]

However, it may not use the Azure SDK to download the cache even if the
`useAzureSdk` option is set to true. If the signed URL does not end with
"blob.core.windows.net," it will not use the Azure SDK to restore the
cache. [^4]

To ensure consistent behavior between saving and restoring the cache,
the Azure SDK should be used to restore the cache if the `useAzureSdk`
option is explicitly set to true.

This PR ensures that the Azure SDK is used to restore the cache whenever
the `useAzureSdk` option is set to true.

[^1]: 1f7c2c79e0/packages/cache/src/cache.ts (L224)
[^2]: 1f7c2c79e0/packages/cache/src/cache.ts (L472)
[^3]: 1f7c2c79e0/packages/cache/src/internal/cacheHttpClient.ts (L335-L343)
[^4]: 1f7c2c79e0/packages/cache/src/internal/cacheHttpClient.ts (L153)
2025-01-24 16:27:40 +03:00
..
artifact Prep release packages/artifact v2.2.1 2025-01-08 21:11:59 +00:00
attest Post merge cleanup 2024-11-14 02:04:20 -08:00
cache [cache] Use Azure SDK to restore cache always if explicitly set to true 2025-01-24 16:27:40 +03:00
core Explicitly import `crypto` (#1842) 2024-10-04 17:23:42 -04:00
exec Update dependencies 2023-09-08 14:29:27 +00:00
github Add RUN_ATTEMPT to Github context 2023-11-28 16:32:10 +01:00
glob Post merge cleanup 2024-11-14 02:04:20 -08:00
http-client Post merge cleanup 2024-11-14 02:04:20 -08:00
io Update dependencies 2023-09-08 14:29:27 +00:00
tool-cache [tool-cache] Update `@actions/core` and prepare 2.0.2 release (#1872) 2025-01-15 15:57:09 -05:00