Blocks deletion of model if it is being used
requested to merge 476258-add-blocking-modal-when-user-attempts-to-delete-self-hosted-model-in-use-frontend into master
What does this MR do and why?
Blocks deletion of model if it is being used
When a self-hosted model is being used to power a feature setting, we prevent its deletion
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Before | After | |
---|---|---|
Table | ||
Deletion modal |
How to set up and validate locally
Prequisites
You will need an active GitLab ultimate license.
- Start GDK instance in self-managed mode:
GITLAB_SIMULATE_SAAS=0 && gdk start
- In the rails console, enable Code Suggestions and the custom models experiment:
Feature.enable(:ai_custom_model)
ApplicationSetting.first.update(duo_features_enabled: true)
- Enable the admin ai-powered feature settings FF
Feature.enable(:custom_models_feature_settings_vue_app)
Test it!
- Log in as an admin
- Visit the page Admin Area > AI-Powered Features > Self-hosted models
- Create a
mistral
self-hosted model - Visit Admin Area > AI-Powered Features > Features
- Set DuoChat, select 'self-hosted models' and select the model you created. click on save changes
- Navigate back and try to delete the model, it shouldn't be possible
Related to #476258 (closed)
Edited by Eduardo Bonet