Skip to content

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

image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. 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 
  2. Visit the project where the model was created

  3. Click on Deploy > Model registry, and navigate to the created model

  4. Click on the overflow menu, than on delete, and verify the model is deleted.

Edited by Eduardo Bonet

Merge request reports