Skip to content

Commit db914e1

Browse files
authored
Merge pull request #79 from jasonschroeder-sfdc/action-cache-enums
fix: actionCache miss reason does NOT have an "UNKNOWN" enum at index 0
2 parents 33a4f49 + 553fc74 commit db914e1

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

frontend/src/components/ActionCacheMetrics/ActionCacheMissTag.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const ALL_STATUS_VALUES = [
2020
'DIFFERENT_FILES',
2121
'CORRUPTED_CACHE_ENTRY',
2222
'NOT_CACHED',
23-
23+
'UNCONDITIONAL_EXECUTION',
2424
] as const;
2525
export type MissDetailTuple = typeof ALL_STATUS_VALUES;
2626
export type MissDetailEnum = MissDetailTuple[number];
@@ -65,7 +65,11 @@ const STATUS_TAGS: { [key in MissDetailEnum]: React.ReactNode } = {
6565
<span className={themeStyles.tagContent}>Not Cached</span>
6666
</Tag>
6767
),
68-
68+
UNCONDITIONAL_EXECUTION: (
69+
<Tag icon={<MinusCircleFilled />} color="green" className={themeStyles.tag}>
70+
<span className={themeStyles.tagContent}>Unconditional Execution</span>
71+
</Tag>
72+
),
6973
};
7074

7175
const MissDetailTag: React.FC<Props> = ({ status }) => {

frontend/src/components/ActionCacheMetrics/index.module.css

+5-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,8 @@
2424

2525
.ac-miss-detail-NOT_CACHED {
2626
color: "#ffbd33"
27-
}
27+
}
28+
29+
.ac-miss-detail-UNCONDITIONAL_EXECUTION {
30+
color: "#008000"
31+
}

frontend/src/components/ActionCacheMetrics/index.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ var ac_colors =
3030
"purple", //different env
3131
"cyan", //diff files
3232
"orange", //corrupted cache entry
33-
"red"] //not cached
33+
"red", //not cached
34+
"green"] //unconditional execution
3435

3536
const ac_columns: TableColumnsType<MissDetailDisplayDataType> = [
3637
{

pkg/summary/summary.go

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ func (r MissReason) EnumIndex() int32 {
4848
// String Enum helper method.
4949
func (r MissReason) String() string {
5050
return [...]string{
51-
"UNKNOWN",
5251
"DIFFERENT_ACTION_KEY",
5352
"DIFFERENT_DEPS",
5453
"DIFFERENT_ENVIRONMENT",

0 commit comments

Comments
 (0)