Allow users to delete candidates
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 | ||
Modal |
How to set up and validate locally
-
Enable the feature flag
echo "Feature.enable(:ml_experiment_tracking)" | bundle exec rails c
-
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)
-
Navigate to the candidate "/path_to_project/-/ml/candidates/1"
-
Click on the dropdown, click on "Delete candidate", confirm the modal.
-
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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Eduardo Bonet