diff --git a/doc/api/code_suggestions.md b/doc/api/code_suggestions.md index 2cf1c9cfa95186294931c5c4c5f5bcd6544cdca8..ef324b71e95ba284c0bae91bb773356681ba9d12 100644 --- a/doc/api/code_suggestions.md +++ b/doc/api/code_suggestions.md @@ -36,6 +36,7 @@ Example response: > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/415581) in GitLab 16.2 [with a flag](../administration/feature_flags.md) named `code_suggestions_completion_api`. Disabled by default. This feature is an Experiment. > - Requirement to generate a JWT before calling this endpoint was [removed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127863) in GitLab 16.3. +> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/416371) in GitLab 16.8. [Feature flag `code_suggestions_completion_api`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/138174) removed. FLAG: On self-managed GitLab, by default this feature is not available. To make it available, an administrator can [enable the feature flag](../administration/feature_flags.md) named `code_suggestions_completion_api`. diff --git a/doc/development/code_suggestions/index.md b/doc/development/code_suggestions/index.md index bdf3bcdd520811d249a37c30d8ce5bf98120d082..409efc41fc27bffdd9bb2dd7d45e915393769118 100644 --- a/doc/development/code_suggestions/index.md +++ b/doc/development/code_suggestions/index.md @@ -24,10 +24,10 @@ This should enable everyone to see locally any change in an IDE being sent to th 1. Open the extension settings by clicking a small cog icon and select "Extension Settings" option 1. Check a "GitLab: Debug" checkbox. 1. Main Application - 1. Enable Feature Flags ```code_suggestions_completion_api``` and ```code_suggestions_tokens_api``` + 1. Enable Feature Flag ```code_suggestions_tokens_api``` 1. In your terminal, navigate to a `gitlab` inside your `gitlab-development-kit` directory 1. Run `bundle exec rails c` to start a Rails console - 1. Call `Feature.enable(:code_suggestions_completion_api)` and `Feature.enable(:code_suggestions_tokens_api)` from the console + 1. Call `Feature.enable(:code_suggestions_tokens_api)` from the console 1. Run the GDK with ```export CODE_SUGGESTIONS_BASE_URL=http://localhost:5052``` 1. [Setup Model Gateway](https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist#how-to-run-the-server-locally) 1. Build tree sitter libraries ```poetry run scripts/build-tree-sitter-lib.py``` diff --git a/ee/config/feature_flags/development/code_suggestions_completion_api.yml b/ee/config/feature_flags/development/code_suggestions_completion_api.yml deleted file mode 100644 index b7344076b9ae547d1a784525f4202bf008a42e5b..0000000000000000000000000000000000000000 --- a/ee/config/feature_flags/development/code_suggestions_completion_api.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: code_suggestions_completion_api -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/125401 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/416371 -milestone: '16.2' -type: development -group: group::ai framework -default_enabled: false diff --git a/ee/lib/api/code_suggestions.rb b/ee/lib/api/code_suggestions.rb index 8f6e39f9970b896346d7b22df2caee0b1e076eba..100b7b9051abc3a91062d42a690ab805c14b0179 100644 --- a/ee/lib/api/code_suggestions.rb +++ b/ee/lib/api/code_suggestions.rb @@ -122,8 +122,6 @@ def gitlab_realm end post do if Gitlab.org_or_com? - forbidden! unless ::Feature.enabled?(:code_suggestions_completion_api, current_user) - if ::Feature.enabled?(:purchase_code_suggestions) not_found! unless current_user.code_suggestions_add_on_available? # rubocop: disable Style/SoleNestedConditional -- Feature Flag shouldn't be checked in the same condition. end diff --git a/ee/spec/requests/api/code_suggestions_spec.rb b/ee/spec/requests/api/code_suggestions_spec.rb index e0b4d8fd1291dcbce72f20e6714b8d8fd77441e9..db2a24700234d6978ccf609600ee47a087da0dfd 100644 --- a/ee/spec/requests/api/code_suggestions_spec.rb +++ b/ee/spec/requests/api/code_suggestions_spec.rb @@ -646,16 +646,6 @@ def is_even(n: int) -> end end - context 'when code_suggestions_completion_api feature flag is disabled' do - let(:current_user) { authorized_user } - - before do - stub_feature_flags(code_suggestions_completion_api: false) - end - - include_examples 'a forbidden response' - end - context 'when purchase_code_suggestions feature flag is disabled' do let(:current_user) { authorized_user }