Ban AI Decommission Duo Features Enabled Component and Update `namespace_settings` Table
What does this MR do and why?
The purposes of this MR is to decommission the HAML Duo Features Enabled component since the new GitLab Duo section has been added via this MR
For database changes, we need to update lock_duo_features_enabled to false when it previously was true and when duo_features_enabled is true. The reason for this is that the new Duo features for Availability handles the following:
- Default on:
lock_duo_features_enabledisfalseandduo_features_enabledistrue - Default off:
lock_duo_features_enabledisfalseandduo_features_enabledisfalse - Never on:
lock_duo_features_enabledistrueandduo_features_enabledisfalse
The previous case with the cascading checkboxes handled 4 conditions instead of the 3 (described above). We want to remove the 4th condition since it will no longer be valid with the removal of the HAML Duo Features enabled component - and thus we need to update/migrate the lock_duo_features_enabled column in the namespace_settings table.
Related Issues:
- #479384 (closed) - Decommission Duo Features Enabled feature from Group and Admin Permission Settings
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
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
For frontend changes:
To utilize the new GitLab Duo features > Availability* use the following feature-flag: ai_settings_vue_group, and make sure it is enabled. This is not required to test the removal of the Duo Features Enabled component.
- Go to Group > Settings > Permissions and group features
- Validate the GitLab Duo features settings section no longer exists.
For the database changes:
- Validate that tables have been updated and that
lock_duo_features_enabledisfalsewhenduo_features_enabledistrue. - Use query
UPDATE namespace_settings
SET lock_duo_features_enabled = false
WHERE lock_duo_features_enabled = true
AND duo_features_enabled = true;
EXPLAIN ANAZLYZE UPDATE namespace_settings
SET lock_duo_features_enabled = false
WHERE lock_duo_features_enabled = true
AND duo_features_enabled = true;
- Compare to Query plan here.

