Skip to content

Allow users to delete candidates

Eduardo Bonet requested to merge mlops/add-deletion-to-candidates into master

What does this MR do and why?

Reuses DeleteButton to allow users to delete a candidate. Upon deletion, users are redirected to the experiment page.

Screenshots or screen recordings

Before After
Page image image
Modal image

How to set up and validate locally

  1. Enable the feature flag

    echo "Feature.enable(:ml_experiment_tracking)" | bundle exec rails c
  2. Create an experiment and a candidate

    user_id = 1 # if you are using root
    project_id = 20 # not necessarily 20, but the project you are using for testing
    exp = Ml::Experiment.create!(name: 'Gitlab Experiment', user_id: user_id, project_id: project_id)
    c = exp.candidates.create!(user_id: user_id, start_time: 0, internal_id: 1, project_id: project_id)
  3. Navigate to the candidate "/path_to_project/-/ml/candidates/1"

  4. Click on the dropdown, click on "Delete candidate", confirm the modal.

  5. Verify that you were redirected to "/path_to_project/-/ml/experiments/1", and that the experiment has no candidates

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Eduardo Bonet

Merge request reports

Loading