Skip to content

Refactor experimental features toggle for non-AI features

Max Woolf requested to merge mw/experimental-features-no-longer-just-for-ai into master

What does this MR do and why?

Refactor experimental features toggle for non-AI features

Currently, top-level ultimate namespaces on SaaS will allow namespace owners to opt-in to experimental features but only if AI features are enabled on that namespace.

The documentation at https://docs.gitlab.com/ee/user/group/manage.html#enable-experiment-features doesn't suggest that this is an AI only feature so this commit refactors the toggle to work outside of the context of AI features.

This should have no effect on any SaaS users. The logic to show the toggle was:

        ::Gitlab::CurrentSettings.should_check_namespace_plan? &&
          ::Feature.enabled?(:openai_experimentation) &&
          ::Feature.enabled?(:ai_related_settings, namespace) &&
          namespace.licensed_feature_available?(:ai_features) &&
          namespace.root?

and is now

        namespace.root? &&
          ::Gitlab::CurrentSettings.should_check_namespace_plan? &&
          namespace.feature_available?(:experimental_features)

Both openai_experimentation, and ai_related_settings are enabled globally on SaaS. I've created a new licensed feature experimental_features which is an Ultimate feature, as was ai_features so the practical effect of this change is nothing.

Related to #414865 (closed)

How to set up and validate locally

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Max Woolf

Merge request reports