@@ -365,6 +365,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
365365 step((generator = generator.apply(thisArg, _arguments || [])).next());
366366 });
367367};
368+ var __importDefault = (this && this.__importDefault) || function (mod) {
369+ return (mod && mod.__esModule) ? mod : { "default": mod };
370+ };
368371Object.defineProperty(exports, "__esModule", ({ value: true }));
369372exports.saveCache = exports.reserveCache = exports.downloadCache = exports.getCacheEntry = exports.getCacheEntryUsingCacheMgr = exports.downloadBlobUsingCacheMgr = exports.waitForArchiveToBeAvailable = exports.mountSharedNFSVolume = exports.getCacheVersion = exports.createHttpClient = exports.getCacheApiUrl = void 0;
370373const core = __importStar(__nccwpck_require__(2186));
@@ -377,8 +380,12 @@ const utils = __importStar(__nccwpck_require__(1518));
377380const downloadUtils_1 = __nccwpck_require__(5500);
378381const options_1 = __nccwpck_require__(6215);
379382const requestUtils_1 = __nccwpck_require__(3981);
383+ <<<<<<< HEAD
380384const axios_1 = __importStar(__nccwpck_require__(8757));
381385const child_process_1 = __nccwpck_require__(2081);
386+ =======
387+ const axios_1 = __importDefault(__nccwpck_require__(8757));
388+ >>>>>>> 86f6ba1 (Bump @actions/cache version to 3.2.158)
382389const versionSalt = '1.0';
383390function getCacheApiUrl(resource) {
384391 var _a, _b;
@@ -570,7 +577,11 @@ function getCacheEntry(keys, paths, options) {
570577 return __awaiter(this, void 0, void 0, function* () {
571578 const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive);
572579 const resource = `?keys=${encodeURIComponent(keys.join(','))}&version=${version}`;
580+ <<<<<<< HEAD
573581 const maxRetries = 3;
582+ =======
583+ const maxRetries = 2;
584+ >>>>>>> 86f6ba1 (Bump @actions/cache version to 3.2.158)
574585 let retries = 0;
575586 core.info(`Checking cache for keys ${keys.join(',')} and version ${version}`);
576587 while (retries <= maxRetries) {
@@ -580,10 +591,16 @@ function getCacheEntry(keys, paths, options) {
580591 headers: {
581592 Accept: createAcceptHeader('application/json', '6.0-preview.1'),
582593 'X-Github-Repo-Name': process.env['GITHUB_REPO_NAME'],
594+ <<<<<<< HEAD
583595 Authorization: `Bearer ${process.env['BLACKSMITH_CACHE_TOKEN']}`,
584596 'X-Cache-Region': (_a = process.env['BLACKSMITH_REGION']) !== null && _a !== void 0 ? _a : 'eu-central'
585597 },
586598 timeout: 3000 // 3 seconds timeout
599+ =======
600+ Authorization: `Bearer ${process.env['BLACKSMITH_CACHE_TOKEN']}`
601+ },
602+ timeout: 10000 // 10 seconds timeout
603+ >>>>>>> 86f6ba1 (Bump @actions/cache version to 3.2.158)
587604 });
588605 core.debug(`Cache lookup took ${Date.now() - before}ms`);
589606 // Cache not found
@@ -609,6 +626,7 @@ function getCacheEntry(keys, paths, options) {
609626 return cacheResult;
610627 }
611628 catch (error) {
629+ <<<<<<< HEAD
612630 if ((error.response && error.response.status >= 500) ||
613631 error.code === 'ECONNABORTED') {
614632 retries++;
@@ -621,12 +639,24 @@ function getCacheEntry(keys, paths, options) {
621639 }
622640 continue;
623641 }
642+ =======
643+ if (error.response &&
644+ error.response.status >= 500 &&
645+ retries < maxRetries) {
646+ retries++;
647+ core.warning(`Retrying due to server error (attempt ${retries} of ${maxRetries})`);
648+ continue;
649+ >>>>>>> 86f6ba1 (Bump @actions/cache version to 3.2.158)
624650 }
625651 if (error.response) {
626652 throw new Error(`Cache service responded with ${error.response.status}`);
627653 }
628654 else if (error.code === 'ECONNABORTED') {
655+ <<<<<<< HEAD
629656 throw new Error('Request timed out after 3 seconds');
657+ =======
658+ throw new Error('Request timed out after 10 seconds');
659+ >>>>>>> 86f6ba1 (Bump @actions/cache version to 3.2.158)
630660 }
631661 else {
632662 throw error;
0 commit comments