mirror of
https://github.com/actions/cache.git
synced 2025-04-20 19:16:46 +00:00
Chunked Cache Upload APIs (#128)
* Initial pass at chunked upload apis * Fix cacheEntry type * Linting * Fix download cache entry tests * Linting tests * Pull in fixes from testing branch * Fix typo in ReserveCacheResponse * Add test convering reserve cache failure * Add retries to upload chunk * PR feedback * Format default chunk size * Remove responses array
This commit is contained in:
parent
a631fadf14
commit
b45d91cc4b
8 changed files with 324 additions and 61 deletions
|
@ -60,7 +60,7 @@ async function run(): Promise<void> {
|
|||
|
||||
try {
|
||||
const cacheEntry = await cacheHttpClient.getCacheEntry(keys);
|
||||
if (!cacheEntry) {
|
||||
if (!cacheEntry?.archiveLocation) {
|
||||
core.info(
|
||||
`Cache not found for input keys: ${keys.join(", ")}.`
|
||||
);
|
||||
|
@ -77,7 +77,10 @@ async function run(): Promise<void> {
|
|||
utils.setCacheState(cacheEntry);
|
||||
|
||||
// Download the cache from the cache entry
|
||||
await cacheHttpClient.downloadCache(cacheEntry, archivePath);
|
||||
await cacheHttpClient.downloadCache(
|
||||
cacheEntry.archiveLocation,
|
||||
archivePath
|
||||
);
|
||||
|
||||
const archiveFileSize = utils.getArchiveFileSize(archivePath);
|
||||
core.info(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue