Rename option to lookup-only

This commit is contained in:
Marc Mueller 2023-01-18 12:21:26 +01:00
parent d1960e64f9
commit 2ef4e0621f
16 changed files with 68 additions and 68 deletions

14
dist/save/index.js vendored
View file

@ -4979,7 +4979,7 @@ var Inputs;
Inputs["RestoreKeys"] = "restore-keys";
Inputs["UploadChunkSize"] = "upload-chunk-size";
Inputs["EnableCrossOsArchive"] = "enableCrossOsArchive";
Inputs["DryRun"] = "dry-run"; // Input for cache, restore action
Inputs["LookupOnly"] = "lookup-only"; // Input for cache, restore action
})(Inputs = exports.Inputs || (exports.Inputs = {}));
var Outputs;
(function (Outputs) {
@ -41866,7 +41866,7 @@ function getDownloadOptions(copy) {
downloadConcurrency: 8,
timeoutInMs: 30000,
segmentTimeoutInMs: 3600000,
dryRun: false
lookupOnly: false
};
if (copy) {
if (typeof copy.useAzureSdk === 'boolean') {
@ -41881,8 +41881,8 @@ function getDownloadOptions(copy) {
if (typeof copy.segmentTimeoutInMs === 'number') {
result.segmentTimeoutInMs = copy.segmentTimeoutInMs;
}
if (typeof copy.dryRun === 'boolean') {
result.dryRun = copy.dryRun;
if (typeof copy.lookupOnly === 'boolean') {
result.lookupOnly = copy.lookupOnly;
}
}
const segmentDownloadTimeoutMins = process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS'];
@ -41896,7 +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(`Dry run: ${result.dryRun}`);
core.debug(`Lookup only: ${result.lookupOnly}`);
return result;
}
exports.getDownloadOptions = getDownloadOptions;
@ -47374,8 +47374,8 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
// Cache not found
return undefined;
}
if (options === null || options === void 0 ? void 0 : options.dryRun) {
core.info('Dry run - skipping download');
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));