From e9b4b25015d04f8915ab881cdbfcd07f52d3456b Mon Sep 17 00:00:00 2001 From: Paul Dittamo Date: Tue, 12 Mar 2024 14:32:29 -0700 Subject: [PATCH] add cache evict status Signed-off-by: Paul Dittamo --- .../oss-console/src/components/Executions/CacheStatus.tsx | 4 ++++ .../src/components/Executions/test/CacheStatus.test.tsx | 1 + .../components/flytegraph/__stories__/CustomNodes.stories.tsx | 1 + 3 files changed, 6 insertions(+) diff --git a/packages/oss-console/src/components/Executions/CacheStatus.tsx b/packages/oss-console/src/components/Executions/CacheStatus.tsx index a92c9e6ec..a99076e3d 100644 --- a/packages/oss-console/src/components/Executions/CacheStatus.tsx +++ b/packages/oss-console/src/components/Executions/CacheStatus.tsx @@ -3,6 +3,7 @@ import { type SvgIconProps } from '@mui/material/SvgIcon'; import Tooltip from '@mui/material/Tooltip'; import Typography from '@mui/material/Typography'; import CachedOutlined from '@mui/icons-material/CachedOutlined'; +import DeleteForeverOutlinedIcon from '@mui/icons-material/DeleteForeverOutlined'; import ErrorOutlined from '@mui/icons-material/ErrorOutlined'; import InfoOutlined from '@mui/icons-material/InfoOutlined'; import SmsFailedOutlinedIcon from '@mui/icons-material/SmsFailedOutlined'; @@ -55,6 +56,9 @@ const NodeExecutionCacheStatusIcon: React.ComponentType< case CatalogCacheStatus.MAP_CACHE: { return ; } + case CatalogCacheStatus.CACHE_EVICTED: { + return ; + } default: { assertNever(status as never); // @ts-ignore diff --git a/packages/oss-console/src/components/Executions/test/CacheStatus.test.tsx b/packages/oss-console/src/components/Executions/test/CacheStatus.test.tsx index f05eb5f11..e52867b1f 100644 --- a/packages/oss-console/src/components/Executions/test/CacheStatus.test.tsx +++ b/packages/oss-console/src/components/Executions/test/CacheStatus.test.tsx @@ -88,6 +88,7 @@ describe('Executions > CacheStatus', () => { ${CatalogCacheStatus.CACHE_MISS} | ${cacheStatusMessages[CatalogCacheStatus.CACHE_MISS]} ${CatalogCacheStatus.CACHE_POPULATED} | ${cacheStatusMessages[CatalogCacheStatus.CACHE_POPULATED]} ${CatalogCacheStatus.CACHE_PUT_FAILURE} | ${cacheStatusMessages[CatalogCacheStatus.CACHE_PUT_FAILURE]} + ${CatalogCacheStatus.CACHE_EVICTED} | ${cacheStatusMessages[CatalogCacheStatus.CACHE_EVICTED]} `('for each case', ({ cacheStatus, expected }) => { it(`renders correct text ${expected} for status ${cacheStatus}`, async () => { const { queryByText } = renderComponent({ cacheStatus }); diff --git a/packages/oss-console/src/components/flytegraph/__stories__/CustomNodes.stories.tsx b/packages/oss-console/src/components/flytegraph/__stories__/CustomNodes.stories.tsx index e1cf6c7c6..91f761520 100644 --- a/packages/oss-console/src/components/flytegraph/__stories__/CustomNodes.stories.tsx +++ b/packages/oss-console/src/components/flytegraph/__stories__/CustomNodes.stories.tsx @@ -69,6 +69,7 @@ const CACHE_STATUSES = [ { status: CatalogCacheStatus.CACHE_MISS, text: 'cache miss' }, { status: CatalogCacheStatus.CACHE_POPULATED, text: 'cache populated' }, { status: CatalogCacheStatus.CACHE_PUT_FAILURE, text: 'cache put failure' }, + { status: CatalogCacheStatus.CACHE_EVICTED, text: 'cache evicted' }, ]; stories.add('Task Node by Cache Status', () => (