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

[8.16] [ML] Fix Trained model deletion with expanded row (#198530) #198567

Merged
merged 1 commit into from
Oct 31, 2024
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 @@ -957,6 +957,14 @@ export const ModelsList: FC<Props> = ({
}
});

setItemIdToExpandedRowMap((prev) => {
const newMap = { ...prev };
modelsToDelete.forEach((model) => {
delete newMap[model.model_id];
});
return newMap;
});

setModelsToDelete([]);

if (refreshList) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,8 @@ export default function ({ getService }: FtrProviderContext) {

it('displays a model without an ingest pipeline and model can be deleted', async () => {
await ml.testExecution.logTestStep('should display the model in the table');
await ml.trainedModelsTable.filterWithSearchString(modelWithoutPipelineData.modelId, 1);
await ml.testExecution.logTestStep('expands the row to show the model details');
await ml.trainedModelsTable.ensureRowIsExpanded(modelWithoutPipelineData.modelId);

await ml.testExecution.logTestStep(
'displays expected row values for the model in the table'
Expand Down