Updated actions/cache version to 3.0.2 · actions/cache@a404368 (original) (raw)
`@@ -5473,6 +5473,7 @@ const util = __importStar(webpack_require(669));
`
5473
5473
`const utils = __importStar(webpack_require(15));
`
5474
5474
`const constants_1 = webpack_require(931);
`
5475
5475
`const requestUtils_1 = webpack_require(899);
`
``
5476
`+
const abort_controller_1 = webpack_require(106);
`
5476
5477
`/**
`
5477
5478
` * Pipes the body of a HTTP response to a stream
`
5478
5479
` *
`
`@@ -5656,11 +5657,16 @@ function downloadCacheStorageSDK(archiveLocation, archivePath, options) {
`
5656
5657
` const fd = fs.openSync(archivePath, 'w');
`
5657
5658
` try {
`
5658
5659
` downloadProgress.startDisplayTimer();
`
``
5660
`+
const abortSignal = abort_controller_1.AbortController.timeout(options.segmentTimeoutInMs || 3600000);
`
``
5661
`+
abortSignal.addEventListener('abort', () => {
`
``
5662
`+
core.warning('Aborting cache download as it exceeded the timeout.');
`
``
5663
`+
});
`
5659
5664
` while (!downloadProgress.isDone()) {
`
5660
5665
` const segmentStart = downloadProgress.segmentOffset + downloadProgress.segmentSize;
`
5661
5666
` const segmentSize = Math.min(maxSegmentSize, contentLength - segmentStart);
`
5662
5667
` downloadProgress.nextSegment(segmentSize);
`
5663
5668
` const result = yield client.downloadToBuffer(segmentStart, segmentSize, {
`
``
5669
`+
abortSignal,
`
5664
5670
` concurrency: options.downloadConcurrency,
`
5665
5671
` onProgress: downloadProgress.onProgress()
`
5666
5672
` });
`
`@@ -40795,7 +40801,8 @@ function getDownloadOptions(copy) {
`
40795
40801
` const result = {
`
40796
40802
` useAzureSdk: true,
`
40797
40803
` downloadConcurrency: 8,
`
40798
``
`-
timeoutInMs: 30000
`
``
40804
`+
timeoutInMs: 30000,
`
``
40805
`+
segmentTimeoutInMs: 3600000
`
40799
40806
` };
`
40800
40807
` if (copy) {
`
40801
40808
` if (typeof copy.useAzureSdk === 'boolean') {
`
`@@ -40807,10 +40814,14 @@ function getDownloadOptions(copy) {
`
40807
40814
` if (typeof copy.timeoutInMs === 'number') {
`
40808
40815
` result.timeoutInMs = copy.timeoutInMs;
`
40809
40816
` }
`
``
40817
`+
if (typeof copy.segmentTimeoutInMs === 'number') {
`
``
40818
`+
result.segmentTimeoutInMs = copy.segmentTimeoutInMs;
`
``
40819
`+
}
`
40810
40820
` }
`
40811
40821
`` core.debug(Use Azure SDK: ${result.useAzureSdk});
``
40812
40822
`` core.debug(Download concurrency: ${result.downloadConcurrency});
``
40813
40823
`` core.debug(Request timeout (ms): ${result.timeoutInMs});
``
``
40824
`` +
core.debug(Segment download timeout (ms): ${result.segmentTimeoutInMs});
``
40814
40825
` return result;
`
40815
40826
`}
`
40816
40827
`exports.getDownloadOptions = getDownloadOptions;
`