diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index 8cf0ab60fd31fcbe99a1cf0d57846bf6fc5e79d7..b5edecbd6a55ed4f9729781134c87ac1cd9cf3c6 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -164,10 +164,6 @@ def application_setting_params # rubocop:disable Metrics/AbcSize params.delete(:domain_denylist_raw) if params[:domain_denylist] params.delete(:domain_allowlist_raw) if params[:domain_allowlist] - if params[:application_setting].key?(:user_email_lookup_limit) - params[:application_setting][:search_rate_limit] ||= params[:application_setting][:user_email_lookup_limit] - end - params[:application_setting].permit(visible_application_setting_attributes) end diff --git a/data/deprecations/14-9-global-search-deprecate-user-email-lookup-limit.yml b/data/deprecations/14-9-global-search-deprecate-user-email-lookup-limit.yml index 667995981e2ea0950e66686a75e40911287b6882..ac78778304776731725b38ba2c41b6b9a761daa6 100644 --- a/data/deprecations/14-9-global-search-deprecate-user-email-lookup-limit.yml +++ b/data/deprecations/14-9-global-search-deprecate-user-email-lookup-limit.yml @@ -1,9 +1,9 @@ -- title: "user_email_lookup_limit API field" +- title: "`user_email_lookup_limit` API field" announcement_milestone: "14.9" - removal_milestone: "15.0" + removal_milestone: "16.7" breaking_change: true reporter: fzimmer body: | # Do not modify this line, instead modify the lines below. - The `user_email_lookup_limit` [API field](https://docs.gitlab.com/ee/api/settings.html) is deprecated and will be removed in GitLab 15.0. Until GitLab 15.0, `user_email_lookup_limit` is aliased to `search_rate_limit` and existing workflows will continue to work. + The `user_email_lookup_limit` [API field](https://docs.gitlab.com/ee/api/settings.html) is deprecated in GitLab 14.9 and removed in GitLab 16.7. Until the feature is removed, `user_email_lookup_limit` is aliased to `search_rate_limit` and existing workflows still work. - Any API calls attempting to change the rate limits for `user_email_lookup_limit` should use `search_rate_limit` instead. + Any API calls to change the rate limits for `user_email_lookup_limit` must use `search_rate_limit` instead. diff --git a/doc/api/settings.md b/doc/api/settings.md index 8645191f1500aa647d6f7e1a38587f98e1e6e797..f65ee907b51a48b930239ce4af18a890490b8ffa 100644 --- a/doc/api/settings.md +++ b/doc/api/settings.md @@ -21,6 +21,7 @@ For information on how to control the application settings cache for an instance > - `delayed_project_deletion` and `delayed_group_deletion` attributes removed in GitLab 16.0. > - `in_product_marketing_emails_enabled` attribute [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/418137) in GitLab 16.6. > - `repository_storages` attribute [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/429675) in GitLab 16.6. +> - `user_email_lookup_limit` attribute [removed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/136886) in GitLab 16.7. List the current [application settings](#list-of-settings-that-can-be-accessed-via-api-calls) of the GitLab instance. @@ -160,6 +161,7 @@ these parameters: > - `always_perform_delayed_deletion` feature flag [enabled](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/113332) in GitLab 15.11. > - `delayed_project_deletion` and `delayed_group_deletion` attributes removed in GitLab 16.0. +> - `user_email_lookup_limit` attribute [removed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/136886) in GitLab 16.7. Use an API call to modify GitLab instance [application settings](#list-of-settings-that-can-be-accessed-via-api-calls). @@ -526,7 +528,6 @@ listed in the descriptions of the relevant settings. | `push_event_hooks_limit` | integer | no | Maximum number of changes (branches or tags) in a single push above which webhooks and integrations are not triggered. Setting to `0` does not disable throttling. | | `rate_limiting_response_text` | string | no | When rate limiting is enabled via the `throttle_*` settings, send this plain text response when a rate limit is exceeded. 'Retry later' is sent if this is blank. | | `raw_blob_request_limit` | integer | no | Maximum number of requests per minute for each raw path (default is `300`). Set to `0` to disable throttling.| -| `user_email_lookup_limit` | integer | no | **{warning}** **[Deprecated](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/80631/)** in GitLab 14.9 will be removed in 15.0. Replaced by `search_rate_limit`. Max number of requests per minute for email lookup. Default: 60. To disable throttling set to 0.| | `search_rate_limit` | integer | no | Max number of requests per minute for performing a search while authenticated. Default: 30. To disable throttling set to 0.| | `search_rate_limit_unauthenticated` | integer | no | Max number of requests per minute for performing a search while unauthenticated. Default: 10. To disable throttling set to 0.| | `recaptcha_enabled` | boolean | no | (**If enabled, requires:** `recaptcha_private_key` and `recaptcha_site_key`) Enable reCAPTCHA. | diff --git a/doc/update/deprecations.md b/doc/update/deprecations.md index 333dad8608650937c7ddd376be89d82ef5c35ce9..6431b8a70124dae4e0ba8249adde4fe298e80e9f 100644 --- a/doc/update/deprecations.md +++ b/doc/update/deprecations.md @@ -1322,6 +1322,26 @@ To prepare for GitLab 15.8 and later, you should: </div> </div> +<div class="milestone-wrapper" data-milestone="16.7"> + +## GitLab 16.7 + +<div class="deprecation breaking-change" data-milestone="16.7"> + +### `user_email_lookup_limit` API field + +<div class="deprecation-notes"> +- Announced in GitLab <span class="milestone">14.9</span> +- Removal in GitLab <span class="milestone">16.7</span> ([breaking change](https://docs.gitlab.com/ee/update/terminology.html#breaking-change)) +</div> + +The `user_email_lookup_limit` [API field](https://docs.gitlab.com/ee/api/settings.html) is deprecated in GitLab 14.9 and removed in GitLab 16.7. Until the feature is removed, `user_email_lookup_limit` is aliased to `search_rate_limit` and existing workflows still work. + +Any API calls to change the rate limits for `user_email_lookup_limit` must use `search_rate_limit` instead. + +</div> +</div> + <div class="milestone-wrapper" data-milestone="16.6"> ## GitLab 16.6 @@ -4569,21 +4589,6 @@ The Container Registry supports [authentication](https://gitlab.com/gitlab-org/c Since it isn't used in the context of GitLab (the product), `htpasswd` authentication will be deprecated in GitLab 14.9 and removed in GitLab 15.0. -</div> - -<div class="deprecation breaking-change" data-milestone="15.0"> - -### user_email_lookup_limit API field - -<div class="deprecation-notes"> -- Announced in GitLab <span class="milestone">14.9</span> -- Removal in GitLab <span class="milestone">15.0</span> ([breaking change](https://docs.gitlab.com/ee/update/terminology.html#breaking-change)) -</div> - -The `user_email_lookup_limit` [API field](https://docs.gitlab.com/ee/api/settings.html) is deprecated and will be removed in GitLab 15.0. Until GitLab 15.0, `user_email_lookup_limit` is aliased to `search_rate_limit` and existing workflows will continue to work. - -Any API calls attempting to change the rate limits for `user_email_lookup_limit` should use `search_rate_limit` instead. - </div> </div> diff --git a/spec/controllers/admin/application_settings_controller_spec.rb b/spec/controllers/admin/application_settings_controller_spec.rb index 8dbdd8db99b800f7f5995c0449342d03848126f4..b7351b8df6e1860892a422c714c912d7af9c4760 100644 --- a/spec/controllers/admin/application_settings_controller_spec.rb +++ b/spec/controllers/admin/application_settings_controller_spec.rb @@ -377,46 +377,6 @@ end end - describe 'user_email_lookup_limit aliasing' do - let(:application_setting) { ApplicationSetting.current } - let(:user_email_lookup_limit) { 8675 } - let(:search_rate_limit) { 309 } - - context 'when search_rate_limit is specified' do - let(:settings_params) do - { - user_email_lookup_limit: user_email_lookup_limit, - search_rate_limit: search_rate_limit - } - end - - it 'updates search_rate_limit with correct value' do - expect(application_setting.search_rate_limit).not_to eq user_email_lookup_limit - expect(application_setting.search_rate_limit).not_to eq search_rate_limit - - put :update, params: { application_setting: settings_params } - - expect(application_setting.reload.search_rate_limit).to eq search_rate_limit - end - end - - context 'when search_rate_limit is not specified' do - let(:settings_params) do - { - user_email_lookup_limit: search_rate_limit - } - end - - it 'applies user_email_lookup_limit value to search_rate_limit' do - expect(application_setting.search_rate_limit).not_to eq search_rate_limit - - put :update, params: { application_setting: settings_params } - - expect(application_setting.reload.search_rate_limit).to eq search_rate_limit - end - end - end - context 'pipeline creation rate limiting' do let(:application_settings) { ApplicationSetting.current }