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

Fix misleading label after creating model registry #3324

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const RoleBindingPermissionsNameInput: React.FC<RoleBindingPermissionsNameInputP
}
return (
<TypeaheadSelect
isScrollable
selectOptions={selectOptions}
selected={value}
isCreatable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ const ModelRegistrySelector: React.FC<ModelRegistrySelectorProps> = ({

const selector = (
<Select
isScrollable
toggle={(toggleRef) => (
<MenuToggle
ref={toggleRef}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ export const ModelRegistryTableRowStatus: React.FC<ModelRegistryTableRowStatusPr
: [];

// Unavailable
if (availableCondition?.status === ConditionStatus.False) {
if (
availableCondition?.status === ConditionStatus.False &&
!popoverMessages.some((message) => message.includes('ContainerCreating'))
) {
statusLabel = ModelRegistryStatusLabel.Unavailable;
icon = <ExclamationCircleIcon />;
color = 'red';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,23 @@ describe('ModelRegistryTableRowStatus', () => {
expect(degradingText).toBeInTheDocument();
});

it('renders "Progressing" status when popover message contains "ContainerCreating"', async () => {
render(
<ModelRegistryTableRowStatus
conditions={[
{
status: 'False',
type: 'Unavailable',
message:
'Deployment is unavailable: pod test has unready containers [grpc-container: {waiting: {reason: ContainerCreating, message: }}',
},
]}
/>,
);

expect(screen.getByText('Progressing')).toBeVisible();
});

it('renders "Progressing" status when conditions are empty', () => {
render(<ModelRegistryTableRowStatus conditions={[]} />);
expect(screen.getByText('Progressing')).toBeVisible();
Expand Down
Loading