TRAP Caching: Re-introduce workaround for download timeout
This commit is contained in:
parent
c939e6615d
commit
bfc56625b0
6 changed files with 16 additions and 12 deletions
6
lib/trap-caching.js
generated
6
lib/trap-caching.js
generated
|
|
@ -100,11 +100,11 @@ async function downloadTrapCaches(codeql, languages, logger) {
|
|||
// The SHA from the base of the PR is the most similar commit we might have a cache for
|
||||
const preferredKey = await cacheKey(codeql, language, baseSha);
|
||||
logger.info(`Looking in Actions cache for TRAP cache with key ${preferredKey}`);
|
||||
const found = await cache.restoreCache([cacheDir], preferredKey, [
|
||||
const found = await (0, util_1.withTimeout)(MAX_CACHE_OPERATION_MS, cache.restoreCache([cacheDir], preferredKey, [
|
||||
// Fall back to any cache with the right key prefix
|
||||
await cachePrefix(codeql, language),
|
||||
], {
|
||||
segmentTimeoutInMs: MAX_CACHE_OPERATION_MS,
|
||||
]), () => {
|
||||
logger.info(`Timed out downloading cache for ${language}, will continue without it`);
|
||||
});
|
||||
if (found === undefined) {
|
||||
// We didn't find a TRAP cache in the Actions cache, so the directory on disk is
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue