Skip to content

Adds GraphQL action to delete models

Eduardo Bonet requested to merge 428910-ui-model-detail-delete-model into master

What does this MR do and why?

Adds a new graphql action to delete ml models.

How to set up and validate locally

  1. In rails console enable the experiment fully, and create a model

    Feature.enable(:model_registry)
    p = Project.find_by(id: 1)
    Ml::FindOrCreateModelService.new(p, "model_1").execute 
  2. Navigate to <gdk>/-/graphql-explorer, and execute the following mutation (replace values with your project and model id):

    mutation {
      mlModelDestroy(input: { projectPath: "root/test-project", id: "gid://gitlab/Ml::Model/1" }){
        errors
      }
    }
    
  3. Model should be deleted without returning errors

Related to #428910 (closed)

Edited by Eduardo Bonet

Merge request reports