Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/add cache evict status #851

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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