Skip to content

Commit 93e962e

Browse files
committed
Revert "Add extra outputs for cache hits"
This reverts commit 19f1562.
1 parent 9c5fbd9 commit 93e962e

File tree

5 files changed

+5
-43
lines changed

5 files changed

+5
-43
lines changed

dist/restore/index.js

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4935,8 +4935,6 @@ var Inputs;
49354935
var Outputs;
49364936
(function (Outputs) {
49374937
Outputs["CacheHit"] = "cache-hit";
4938-
Outputs["ExactCacheHit"] = "exact-cache-hit";
4939-
Outputs["FuzzyCacheHit"] = "fuzzy-cache-hit";
49404938
})(Outputs = exports.Outputs || (exports.Outputs = {}));
49414939
var State;
49424940
(function (State) {
@@ -38384,7 +38382,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
3838438382
return result;
3838538383
};
3838638384
Object.defineProperty(exports, "__esModule", { value: true });
38387-
exports.isCacheFeatureAvailable = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setFuzzyCacheHitOutput = exports.setExactCacheHitOutput = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
38385+
exports.isCacheFeatureAvailable = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
3838838386
const cache = __importStar(__webpack_require__(692));
3838938387
const core = __importStar(__webpack_require__(470));
3839038388
const constants_1 = __webpack_require__(196);
@@ -38408,14 +38406,6 @@ function setCacheHitOutput(isCacheHit) {
3840838406
core.setOutput(constants_1.Outputs.CacheHit, isCacheHit.toString());
3840938407
}
3841038408
exports.setCacheHitOutput = setCacheHitOutput;
38411-
function setExactCacheHitOutput(isCacheHit) {
38412-
core.setOutput(constants_1.Outputs.ExactCacheHit, isCacheHit.toString());
38413-
}
38414-
exports.setExactCacheHitOutput = setExactCacheHitOutput;
38415-
function setFuzzyCacheHitOutput(isCacheHit) {
38416-
core.setOutput(constants_1.Outputs.FuzzyCacheHit, isCacheHit.toString());
38417-
}
38418-
exports.setFuzzyCacheHitOutput = setFuzzyCacheHitOutput;
3841938409
function setOutputAndState(key, cacheKey) {
3842038410
setCacheHitOutput(isExactKeyMatch(key, cacheKey));
3842138411
// Store the matched cache key if it exists
@@ -48966,8 +48956,6 @@ function run() {
4896648956
try {
4896748957
if (!utils.isCacheFeatureAvailable()) {
4896848958
utils.setCacheHitOutput(false);
48969-
utils.setExactCacheHitOutput(false);
48970-
utils.setFuzzyCacheHitOutput(false);
4897148959
return;
4897248960
}
4897348961
// Validate inputs, this can cause task failure
@@ -48992,9 +48980,7 @@ function run() {
4899248980
// Store the matched cache key
4899348981
utils.setCacheState(cacheKey);
4899448982
const isExactKeyMatch = utils.isExactKeyMatch(primaryKey, cacheKey);
48995-
utils.setCacheHitOutput(true);
48996-
utils.setExactCacheHitOutput(isExactKeyMatch);
48997-
utils.setFuzzyCacheHitOutput(!isExactKeyMatch);
48983+
utils.setCacheHitOutput(isExactKeyMatch);
4899848984
core.info(`Cache restored from key: ${cacheKey}`);
4899948985
}
4900048986
catch (error) {

dist/save/index.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4935,8 +4935,6 @@ var Inputs;
49354935
var Outputs;
49364936
(function (Outputs) {
49374937
Outputs["CacheHit"] = "cache-hit";
4938-
Outputs["ExactCacheHit"] = "exact-cache-hit";
4939-
Outputs["FuzzyCacheHit"] = "fuzzy-cache-hit";
49404938
})(Outputs = exports.Outputs || (exports.Outputs = {}));
49414939
var State;
49424940
(function (State) {
@@ -38384,7 +38382,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
3838438382
return result;
3838538383
};
3838638384
Object.defineProperty(exports, "__esModule", { value: true });
38387-
exports.isCacheFeatureAvailable = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setFuzzyCacheHitOutput = exports.setExactCacheHitOutput = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
38385+
exports.isCacheFeatureAvailable = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
3838838386
const cache = __importStar(__webpack_require__(692));
3838938387
const core = __importStar(__webpack_require__(470));
3839038388
const constants_1 = __webpack_require__(196);
@@ -38408,14 +38406,6 @@ function setCacheHitOutput(isCacheHit) {
3840838406
core.setOutput(constants_1.Outputs.CacheHit, isCacheHit.toString());
3840938407
}
3841038408
exports.setCacheHitOutput = setCacheHitOutput;
38411-
function setExactCacheHitOutput(isCacheHit) {
38412-
core.setOutput(constants_1.Outputs.ExactCacheHit, isCacheHit.toString());
38413-
}
38414-
exports.setExactCacheHitOutput = setExactCacheHitOutput;
38415-
function setFuzzyCacheHitOutput(isCacheHit) {
38416-
core.setOutput(constants_1.Outputs.FuzzyCacheHit, isCacheHit.toString());
38417-
}
38418-
exports.setFuzzyCacheHitOutput = setFuzzyCacheHitOutput;
3841938409
function setOutputAndState(key, cacheKey) {
3842038410
setCacheHitOutput(isExactKeyMatch(key, cacheKey));
3842138411
// Store the matched cache key if it exists

src/constants.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ export enum Inputs {
66
}
77

88
export enum Outputs {
9-
CacheHit = "cache-hit",
10-
ExactCacheHit = "exact-cache-hit",
11-
FuzzyCacheHit = "fuzzy-cache-hit"
9+
CacheHit = "cache-hit"
1210
}
1311

1412
export enum State {

src/restore.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ async function run(): Promise<void> {
88
try {
99
if (!utils.isCacheFeatureAvailable()) {
1010
utils.setCacheHitOutput(false);
11-
utils.setExactCacheHitOutput(false);
12-
utils.setFuzzyCacheHitOutput(false);
1311
return;
1412
}
1513

@@ -52,9 +50,7 @@ async function run(): Promise<void> {
5250
utils.setCacheState(cacheKey);
5351

5452
const isExactKeyMatch = utils.isExactKeyMatch(primaryKey, cacheKey);
55-
utils.setCacheHitOutput(true);
56-
utils.setExactCacheHitOutput(isExactKeyMatch);
57-
utils.setFuzzyCacheHitOutput(!isExactKeyMatch);
53+
utils.setCacheHitOutput(isExactKeyMatch);
5854
core.info(`Cache restored from key: ${cacheKey}`);
5955
} catch (error: unknown) {
6056
core.setFailed((error as Error).message);

src/utils/actionUtils.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@ export function setCacheHitOutput(isCacheHit: boolean): void {
2727
core.setOutput(Outputs.CacheHit, isCacheHit.toString());
2828
}
2929

30-
export function setExactCacheHitOutput(isCacheHit: boolean): void {
31-
core.setOutput(Outputs.ExactCacheHit, isCacheHit.toString());
32-
}
33-
34-
export function setFuzzyCacheHitOutput(isCacheHit: boolean): void {
35-
core.setOutput(Outputs.FuzzyCacheHit, isCacheHit.toString());
36-
}
37-
3830
export function setOutputAndState(key: string, cacheKey?: string): void {
3931
setCacheHitOutput(isExactKeyMatch(key, cacheKey));
4032
// Store the matched cache key if it exists

0 commit comments

Comments
 (0)