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