@@ -365,6 +365,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
365
365
step((generator = generator.apply(thisArg, _arguments || [])).next());
366
366
});
367
367
};
368
+ var __importDefault = (this && this.__importDefault) || function (mod) {
369
+ return (mod && mod.__esModule) ? mod : { "default": mod };
370
+ };
368
371
Object.defineProperty(exports, "__esModule", ({ value: true }));
369
372
exports.saveCache = exports.reserveCache = exports.downloadCache = exports.getCacheEntry = exports.getCacheEntryUsingCacheMgr = exports.downloadBlobUsingCacheMgr = exports.waitForArchiveToBeAvailable = exports.mountSharedNFSVolume = exports.getCacheVersion = exports.createHttpClient = exports.getCacheApiUrl = void 0;
370
373
const core = __importStar(__nccwpck_require__(2186));
@@ -377,8 +380,12 @@ const utils = __importStar(__nccwpck_require__(1518));
377
380
const downloadUtils_1 = __nccwpck_re
10000
quire__(5500);
378
381
const options_1 = __nccwpck_require__(6215);
379
382
const requestUtils_1 = __nccwpck_require__(3981);
383
+ <<<<<<< HEAD
380
384
const axios_1 = __importStar(__nccwpck_require__(8757));
381
385
const 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)
382
389
const versionSalt = '1.0';
383
390
function getCacheApiUrl(resource) {
384
391
var _a, _b;
@@ -570,7 +577,11 @@ function getCacheEntry(keys, paths, options) {
570
577
return __awaiter(this, void 0, void 0, function* () {
571
578
const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive);
572
579
const resource = `?keys=${encodeURIComponent(keys.join(','))}&version=${version}`;
580
+ <<<<<<< HEAD
573
581
const maxRetries = 3;
582
+ =======
583
+ const maxRetries = 2;
584
+ >>>>>>> 86f6ba1 (Bump @actions/cache version to 3.2.158)
574
585
let retries = 0;
575
586
core.info(`Checking cache for keys ${keys.join(',')} and version ${version}`);
576
587
while (retries <= maxRetries) {
@@ -580,10 +591,16 @@ function getCacheEntry(keys, paths, options) {
580
591
headers: {
581
592
Accept: createAcceptHeader('application/json', '6.0-preview.1'),
582
593
'X-Github-Repo-Name': process.env['GITHUB_REPO_NAME'],
594
+ <<<<<<< HEAD
583
595
Authorization: `Bearer ${process.env['BLACKSMITH_CACHE_TOKEN']}`,
584
596
'X-Cache-Region': (_a = process.env['BLACKSMITH_REGION']) !== null && _a !== void 0 ? _a : 'eu-central'
585
597
},
586
598
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)
587
604
});
588
605
core.debug(`Cache lookup took ${Date.now() - before}ms`);
589
606
// Cache not found
@@ -609,6 +626,7 @@ function getCacheEntry(keys, paths, options) {
609
626
return cacheResult;
610
627
}
611
628
catch (error) {
629
+ <<<<<<< HEAD
612
630
if ((error.response && error.response.status >= 500) ||
613
631
error.code === 'ECONNABORTED') {
61
8000
4
632
retries++;
@@ -621,12 +639,24 @@ function getCacheEntry(keys, paths, options) {
621
639
}
622
640
continue;
623
641
}
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)
624
650
}
625
651
if (error.response) {
626
652
throw new Error(`Cache service responded with ${error.response.status}`);
627
653
}
628
654
else if (error.code === 'ECONNABORTED') {
655
+ <<<<<<< HEAD
629
656
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)
630
660
}
631
661
else {
632
662
throw error;
0 commit comments