Install custom actions/cache version - with lookupOnly support

This commit is contained in:
Marc Mueller 2023-01-30 14:38:31 +01:00
parent 627f0f41f6
commit 97a8c2bc1c
6 changed files with 48 additions and 12 deletions

View file

@ -41809,7 +41809,8 @@ function getDownloadOptions(copy) {
useAzureSdk: true,
downloadConcurrency: 8,
timeoutInMs: 30000,
segmentTimeoutInMs: 3600000
segmentTimeoutInMs: 3600000,
lookupOnly: false
};
if (copy) {
if (typeof copy.useAzureSdk === 'boolean') {
@ -41824,6 +41825,9 @@ function getDownloadOptions(copy) {
if (typeof copy.segmentTimeoutInMs === 'number') {
result.segmentTimeoutInMs = copy.segmentTimeoutInMs;
}
if (typeof copy.lookupOnly === 'boolean') {
result.lookupOnly = copy.lookupOnly;
}
}
const segmentDownloadTimeoutMins = process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS'];
if (segmentDownloadTimeoutMins &&
@ -41836,6 +41840,7 @@ function getDownloadOptions(copy) {
core.debug(`Request timeout (ms): ${result.timeoutInMs}`);
core.debug(`Cache segment download timeout mins env var: ${process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS']}`);
core.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`);
core.debug(`Lookup only: ${result.lookupOnly}`);
return result;
}
exports.getDownloadOptions = getDownloadOptions;
@ -47284,6 +47289,10 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
// Cache not found
return undefined;
}
if (options === null || options === void 0 ? void 0 : options.lookupOnly) {
core.info('Lookup only - skipping download');
return cacheEntry.cacheKey;
}
archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod));
core.debug(`Archive Path: ${archivePath}`);
// Download the cache from the cache entry

11
dist/restore/index.js vendored
View file

@ -41780,7 +41780,8 @@ function getDownloadOptions(copy) {
useAzureSdk: true,
downloadConcurrency: 8,
timeoutInMs: 30000,
segmentTimeoutInMs: 3600000
segmentTimeoutInMs: 3600000,
lookupOnly: false
};
if (copy) {
if (typeof copy.useAzureSdk === 'boolean') {
@ -41795,6 +41796,9 @@ function getDownloadOptions(copy) {
if (typeof copy.segmentTimeoutInMs === 'number') {
result.segmentTimeoutInMs = copy.segmentTimeoutInMs;
}
if (typeof copy.lookupOnly === 'boolean') {
result.lookupOnly = copy.lookupOnly;
}
}
const segmentDownloadTimeoutMins = process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS'];
if (segmentDownloadTimeoutMins &&
@ -41807,6 +41811,7 @@ function getDownloadOptions(copy) {
core.debug(`Request timeout (ms): ${result.timeoutInMs}`);
core.debug(`Cache segment download timeout mins env var: ${process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS']}`);
core.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`);
core.debug(`Lookup only: ${result.lookupOnly}`);
return result;
}
exports.getDownloadOptions = getDownloadOptions;
@ -47255,6 +47260,10 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
// Cache not found
return undefined;
}
if (options === null || options === void 0 ? void 0 : options.lookupOnly) {
core.info('Lookup only - skipping download');
return cacheEntry.cacheKey;
}
archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod));
core.debug(`Archive Path: ${archivePath}`);
// Download the cache from the cache entry

View file

@ -41921,7 +41921,8 @@ function getDownloadOptions(copy) {
useAzureSdk: true,
downloadConcurrency: 8,
timeoutInMs: 30000,
segmentTimeoutInMs: 3600000
segmentTimeoutInMs: 3600000,
lookupOnly: false
};
if (copy) {
if (typeof copy.useAzureSdk === 'boolean') {
@ -41936,6 +41937,9 @@ function getDownloadOptions(copy) {
if (typeof copy.segmentTimeoutInMs === 'number') {
result.segmentTimeoutInMs = copy.segmentTimeoutInMs;
}
if (typeof copy.lookupOnly === 'boolean') {
result.lookupOnly = copy.lookupOnly;
}
}
const segmentDownloadTimeoutMins = process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS'];
if (segmentDownloadTimeoutMins &&
@ -41948,6 +41952,7 @@ function getDownloadOptions(copy) {
core.debug(`Request timeout (ms): ${result.timeoutInMs}`);
core.debug(`Cache segment download timeout mins env var: ${process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS']}`);
core.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`);
core.debug(`Lookup only: ${result.lookupOnly}`);
return result;
}
exports.getDownloadOptions = getDownloadOptions;
@ -47396,6 +47401,10 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
// Cache not found
return undefined;
}
if (options === null || options === void 0 ? void 0 : options.lookupOnly) {
core.info('Lookup only - skipping download');
return cacheEntry.cacheKey;
}
archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod));
core.debug(`Archive Path: ${archivePath}`);
// Download the cache from the cache entry

11
dist/save/index.js vendored
View file

@ -41865,7 +41865,8 @@ function getDownloadOptions(copy) {
useAzureSdk: true,
downloadConcurrency: 8,
timeoutInMs: 30000,
segmentTimeoutInMs: 3600000
segmentTimeoutInMs: 3600000,
lookupOnly: false
};
if (copy) {
if (typeof copy.useAzureSdk === 'boolean') {
@ -41880,6 +41881,9 @@ function getDownloadOptions(copy) {
if (typeof copy.segmentTimeoutInMs === 'number') {
result.segmentTimeoutInMs = copy.segmentTimeoutInMs;
}
if (typeof copy.lookupOnly === 'boolean') {
result.lookupOnly = copy.lookupOnly;
}
}
const segmentDownloadTimeoutMins = process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS'];
if (segmentDownloadTimeoutMins &&
@ -41892,6 +41896,7 @@ function getDownloadOptions(copy) {
core.debug(`Request timeout (ms): ${result.timeoutInMs}`);
core.debug(`Cache segment download timeout mins env var: ${process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS']}`);
core.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`);
core.debug(`Lookup only: ${result.lookupOnly}`);
return result;
}
exports.getDownloadOptions = getDownloadOptions;
@ -47369,6 +47374,10 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
// Cache not found
return undefined;
}
if (options === null || options === void 0 ? void 0 : options.lookupOnly) {
core.info('Lookup only - skipping download');
return cacheEntry.cacheKey;
}
archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod));
core.debug(`Archive Path: ${archivePath}`);
// Download the cache from the cache entry

14
package-lock.json generated
View file

@ -9,7 +9,7 @@
"version": "3.2.4",
"license": "MIT",
"dependencies": {
"@actions/cache": "^3.1.2",
"@actions/cache": "https://github.com/cdce8p/toolkit/raw/cache-dry-run-release/packages/cache/actions-cache-3.1.3.tgz",
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1",
"@actions/io": "^1.1.2"
@ -36,9 +36,10 @@
}
},
"node_modules/@actions/cache": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.1.2.tgz",
"integrity": "sha512-3XeKcXIonfIbqvW7gPm/VLOhv1RHQ1dtTgSBCH6OUhCgSTii9bEVgu0PIms7UbLnXeMCKFzECfpbud8fJEvBbQ==",
"version": "3.1.3",
"resolved": "https://github.com/cdce8p/toolkit/raw/cache-dry-run-release/packages/cache/actions-cache-3.1.3.tgz",
"integrity": "sha512-MuG08PR5rNlFjrWJPTvs6uzF2W7ddovjFZHd1ivwehn+Epj01v7MIDDfd7ooeXJ104/ksCj0JhEDr2SxvhxxWA==",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/exec": "^1.0.1",
@ -9722,9 +9723,8 @@
},
"dependencies": {
"@actions/cache": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.1.2.tgz",
"integrity": "sha512-3XeKcXIonfIbqvW7gPm/VLOhv1RHQ1dtTgSBCH6OUhCgSTii9bEVgu0PIms7UbLnXeMCKFzECfpbud8fJEvBbQ==",
"version": "https://github.com/cdce8p/toolkit/raw/cache-dry-run-release/packages/cache/actions-cache-3.1.3.tgz",
"integrity": "sha512-MuG08PR5rNlFjrWJPTvs6uzF2W7ddovjFZHd1ivwehn+Epj01v7MIDDfd7ooeXJ104/ksCj0JhEDr2SxvhxxWA==",
"requires": {
"@actions/core": "^1.10.0",
"@actions/exec": "^1.0.1",

View file

@ -23,7 +23,7 @@
"author": "GitHub",
"license": "MIT",
"dependencies": {
"@actions/cache": "^3.1.2",
"@actions/cache": "https://github.com/cdce8p/toolkit/raw/cache-dry-run-release/packages/cache/actions-cache-3.1.3.tgz",
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1",
"@actions/io": "^1.1.2"