Skip to content

Add instance-level setting to enable Code Suggestions for SM

Aleksei Lipniagov requested to merge 412436-add-enabled-be into master

What does this MR do and why?

Add instance-level Application Setting to enable Code Suggestions for Self-Managed instances.

This field will be responsible for the checkbox value discussed in #413522 (closed)
Example how it will be used: !121272 (comment 1412860420)

FE-related changes will be done in the next MRs.

More context in #412338 (comment 1401293542) and https://gitlab.com/gitlab-org/gitlab/-/issues/412337

For SaaS, we'll make sure it will be set to ON before any code that relies on that field will be deployed.

How to set up and validate locally

Switch to this branch

Run migrations: bin/rails db:migrate

In the Rails console, check that accessing the field does not throw an error:

[1] pry(main)> ::Gitlab::CurrentSettings.instance_level_code_suggestions_enabled
=> false

MR acceptance checklist

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

Related to #412436 (closed)

Edited by Aleksei Lipniagov

Merge request reports