Skip to content

Commit a404368

Browse files
committed
Updated actions/cache version to 3.0.2
1 parent f427802 commit a404368

5 files changed

Lines changed: 36 additions & 14 deletions

File tree

.licenses/npm/@actions/cache.dep.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/restore/index.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5473,6 +5473,7 @@ const util = __importStar(__webpack_require__(669));
54735473
const utils = __importStar(__webpack_require__(15));
54745474
const constants_1 = __webpack_require__(931);
54755475
const requestUtils_1 = __webpack_require__(899);
5476+
const abort_controller_1 = __webpack_require__(106);
54765477
/**
54775478
* Pipes the body of a HTTP response to a stream
54785479
*
@@ -5656,11 +5657,16 @@ function downloadCacheStorageSDK(archiveLocation, archivePath, options) {
56565657
const fd = fs.openSync(archivePath, 'w');
56575658
try {
56585659
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+
});
56595664
while (!downloadProgress.isDone()) {
56605665
const segmentStart = downloadProgress.segmentOffset + downloadProgress.segmentSize;
56615666
const segmentSize = Math.min(maxSegmentSize, contentLength - segmentStart);
56625667
downloadProgress.nextSegment(segmentSize);
56635668
const result = yield client.downloadToBuffer(segmentStart, segmentSize, {
5669+
abortSignal,
56645670
concurrency: options.downloadConcurrency,
56655671
onProgress: downloadProgress.onProgress()
56665672
});
@@ -40795,7 +40801,8 @@ function getDownloadOptions(copy) {
4079540801
const result = {
4079640802
useAzureSdk: true,
4079740803
downloadConcurrency: 8,
40798-
timeoutInMs: 30000
40804+
timeoutInMs: 30000,
40805+
segmentTimeoutInMs: 3600000
4079940806
};
4080040807
if (copy) {
4080140808
if (typeof copy.useAzureSdk === 'boolean') {
@@ -40807,10 +40814,14 @@ function getDownloadOptions(copy) {
4080740814
if (typeof copy.timeoutInMs === 'number') {
4080840815
result.timeoutInMs = copy.timeoutInMs;
4080940816
}
40817+
if (typeof copy.segmentTimeoutInMs === 'number') {
40818+
result.segmentTimeoutInMs = copy.segmentTimeoutInMs;
40819+
}
4081040820
}
4081140821
core.debug(`Use Azure SDK: ${result.useAzureSdk}`);
4081240822
core.debug(`Download concurrency: ${result.downloadConcurrency}`);
4081340823
core.debug(`Request timeout (ms): ${result.timeoutInMs}`);
40824+
core.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`);
4081440825
return result;
4081540826
}
4081640827
exports.getDownloadOptions = getDownloadOptions;

dist/save/index.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5473,6 +5473,7 @@ const util = __importStar(__webpack_require__(669));
54735473
const utils = __importStar(__webpack_require__(15));
54745474
const constants_1 = __webpack_require__(931);
54755475
const requestUtils_1 = __webpack_require__(899);
5476+
const abort_controller_1 = __webpack_require__(106);
54765477
/**
54775478
* Pipes the body of a HTTP response to a stream
54785479
*
@@ -5656,11 +5657,16 @@ function downloadCacheStorageSDK(archiveLocation, archivePath, options) {
56565657
const fd = fs.openSync(archivePath, 'w');
56575658
try {
56585659
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+
});
56595664
while (!downloadProgress.isDone()) {
56605665
const segmentStart = downloadProgress.segmentOffset + downloadProgress.segmentSize;
56615666
const segmentSize = Math.min(maxSegmentSize, contentLength - segmentStart);
56625667
downloadProgress.nextSegment(segmentSize);
56635668
const result = yield client.downloadToBuffer(segmentStart, segmentSize, {
5669+
abortSignal,
56645670
concurrency: options.downloadConcurrency,
56655671
onProgress: downloadProgress.onProgress()
56665672
});
@@ -40795,7 +40801,8 @@ function getDownloadOptions(copy) {
4079540801
const result = {
4079640802
useAzureSdk: true,
4079740803
downloadConcurrency: 8,
40798-
timeoutInMs: 30000
40804+
timeoutInMs: 30000,
40805+
segmentTimeoutInMs: 3600000
4079940806
};
4080040807
if (copy) {
4080140808
if (typeof copy.useAzureSdk === 'boolean') {
@@ -40807,10 +40814,14 @@ function getDownloadOptions(copy) {
4080740814
if (typeof copy.timeoutInMs === 'number') {
4080840815
result.timeoutInMs = copy.timeoutInMs;
4080940816
}
40817+
if (typeof copy.segmentTimeoutInMs === 'number') {
40818+
result.segmentTimeoutInMs = copy.segmentTimeoutInMs;
40819+
}
4081040820
}
4081140821
core.debug(`Use Azure SDK: ${result.useAzureSdk}`);
4081240822
core.debug(`Download concurrency: ${result.downloadConcurrency}`);
4081340823
core.debug(`Request timeout (ms): ${result.timeoutInMs}`);
40824+
core.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`);
4081440825
return result;
4081540826
}
4081640827
exports.getDownloadOptions = getDownloadOptions;

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cache",
3-
"version": "3.0.6",
3+
"version": "3.0.7",
44
"private": true,
55
"description": "Cache dependencies and build outputs",
66
"main": "dist/restore/index.js",
@@ -23,7 +23,7 @@
2323
"author": "GitHub",
2424
"license": "MIT",
2525
"dependencies": {
26-
"@actions/cache": "^3.0.1",
26+
"@actions/cache": "^3.0.2",
2727
"@actions/core": "^1.7.0",
2828
"@actions/exec": "^1.1.1",
2929
"@actions/io": "^1.1.2"

0 commit comments

Comments
 (0)