Skip to content

[FIX] Refresh self-hosted models and feature settings data upon feature setting update

Julie Huang requested to merge jh/fix-self-hosted-models-data-refreshes into master

What does this MR do and why?

This MR fixes a bug where self-hosted models and feature settings data is not being re-fetched when a feature setting has been updated. This meant components weren't re-rendering and would continue to show stale data.

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

Self-hosted models

Before After
Screen_Recording_2024-10-16_at_5.28.25_PM Screen_Recording_2024-10-16_at_5.25.00_PM

Feature Settings

Before After
Screen_Recording_2024-10-16_at_6.39.08_PM Screen_Recording_2024-10-16_at_6.41.16_PM

How to set up and validate locally

Prequisites

You will need an active GitLab ultimate license.

  1. Start GDK instance in self-managed mode:

GITLAB_SIMULATE_SAAS=0 && gdk start

  1. Visit the GDK feature flags page and ensure the following flags are enabled ai_custom_model, custom_models_vue_app, custom_models_feature_settings_vue_app
  2. Go to the rails console and ensure Code Suggestions is enabled
ApplicationSetting.first.update(duo_features_enabled: true)

Test it!

  1. Log in as an admin
  2. Visit Admin Area > Self-hosted models
    Screenshot_2024-10-09_at_4.30.29_PM
  3. You should now see the "Self-hosted models" and "AI-powered features" tabs as seen above
Edited by Julie Huang

Merge request reports

Loading