Refactor model deletion functionality
What does this MR do and why?
show_ml_model is being migrated to use graphql to also fetch the model (!149829 (merged)), and the component would get too big. The deletion functionality will also be added to the index model page, so we are extracting into a functional component, similar to how package registry does it.
No UI changes
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
In rails console enable the experiment fully and create a model and model version
Feature.enable(:model_registry) p = Project.find_by(id: 1) Ml::CreateModelService.new(p, "model_1").execute
-
Visit the project where the model was created
-
Click on
Deploy > Model registry
, and navigate to the created model -
Click on the overflow menu, than on delete, and verify the model is deleted.
Edited by Eduardo Bonet