Skip to content

Commit

Permalink
add cache evict status
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Dittamo <[email protected]>
  • Loading branch information
pvditt committed Mar 12, 2024
1 parent eb7fe2b commit e9b4b25
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -55,6 +56,9 @@ const NodeExecutionCacheStatusIcon: React.ComponentType<
case CatalogCacheStatus.MAP_CACHE: {
return <MapCacheIcon {...svgIconProps} ref={ref} data-testid="cache-icon" />;
}
case CatalogCacheStatus.CACHE_EVICTED: {
return <DeleteForeverOutlinedIcon {...svgIconProps} ref={ref} data-testid="cache-icon" />;
}
default: {
assertNever(status as never);
// @ts-ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => (
Expand Down

0 comments on commit e9b4b25

Please sign in to comment.