Allow AI features to be available on Self-Managed
What does this MR do and why?
Allow enabling AI features on SM instances.
Changes include: small class that is responsible for checking feature flags based on new class that is SSOT for all ai features.
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
- Run GDK in NON-Saas mode.
- Verify on master that you cannot see standalone ai features (for example: generating issue description).
- In rails console disable the feature flag that is used on SaaS
Feature.disable(:ai_global_switch)
- In this file, enable one feature for self-managed, by changing
self-managed
value totrue
. I checked it work without any additional changes forgenerate_description
. - Two changes that are not connected to this MR but are required or helpful:
- in https://gitlab.com/gitlab-org/gitlab/-/blob/18049920a4336431d2dc35580b2550f63eaa6017/ee/app/workers/llm/completion_worker.rb#L33-33 - change
perform_async
toperform_inline
- in this method comment out full if-clause.
- Visit page for generating new issue and check if there is a button that indicates this feature is active.
- Click on the button and generate description.
Edited by Gosia Ksionek