From 47cfd5a92855517f7efed8b0dcc4bfc4aadf5bef Mon Sep 17 00:00:00 2001 From: bmarjanovic Date: Tue, 14 Nov 2023 17:39:01 +0100 Subject: [PATCH 1/5] Cleanup `user_email_lookup_limit` attribute --- .../admin/application_settings_controller.rb | 4 -- doc/api/settings.md | 3 +- .../application_settings_controller_spec.rb | 40 ------------------- 3 files changed, 2 insertions(+), 45 deletions(-) diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index 8cf0ab60fd31fc..b5edecbd6a55ed 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/doc/api/settings.md b/doc/api/settings.md index 9c0a1e8e4a8feb..22d914aa20c053 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 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 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/spec/controllers/admin/application_settings_controller_spec.rb b/spec/controllers/admin/application_settings_controller_spec.rb index 8dbdd8db99b800..b7351b8df6e186 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 } -- GitLab From 1bcba2ff0d4be0b08998385a50d9e13f9d62ede2 Mon Sep 17 00:00:00 2001 From: bmarjanovic Date: Thu, 16 Nov 2023 13:00:37 +0100 Subject: [PATCH 2/5] Update deprecations docs --- ...arch-deprecate-user-email-lookup-limit.yml | 4 +-- doc/update/deprecations.md | 35 +++++++++++-------- 2 files changed, 22 insertions(+), 17 deletions(-) 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 667995981e2ea0..5b66a17320f9b7 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" 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 and removed in GitLab 16.7. Until GitLab 16.7, `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. diff --git a/doc/update/deprecations.md b/doc/update/deprecations.md index 333dad86086509..cd357bd3f048b1 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: +
+ +## GitLab 16.7 + +
+ +### user_email_lookup_limit API field + +
+- Announced in GitLab 14.9 +- Removal in GitLab 16.7 ([breaking change](https://docs.gitlab.com/ee/update/terminology.html#breaking-change)) +
+ +The `user_email_lookup_limit` [API field](https://docs.gitlab.com/ee/api/settings.html) is deprecated and removed in GitLab 16.7. Until GitLab 16.7, `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. + +
+
+
## 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. -
- -
- -### user_email_lookup_limit API field - -
-- Announced in GitLab 14.9 -- Removal in GitLab 15.0 ([breaking change](https://docs.gitlab.com/ee/update/terminology.html#breaking-change)) -
- -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. -
-- GitLab From 6be8afcb30c479448281d0ab76a8fb8d3a231c1c Mon Sep 17 00:00:00 2001 From: Ashraf Khamis Date: Thu, 16 Nov 2023 12:01:19 +0000 Subject: [PATCH 3/5] Apply TW feedback --- doc/api/settings.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/settings.md b/doc/api/settings.md index 22d914aa20c053..cbee3539c16c23 100644 --- a/doc/api/settings.md +++ b/doc/api/settings.md @@ -21,7 +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 in GitLab 16.7. +> - `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. @@ -161,7 +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 in GitLab 16.7. +> - `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). -- GitLab From 5892e66e48c4f2757f03f75994789298d8fac960 Mon Sep 17 00:00:00 2001 From: Ashraf Khamis Date: Thu, 16 Nov 2023 13:09:19 +0000 Subject: [PATCH 4/5] Apply TW suggestions --- ...14-9-global-search-deprecate-user-email-lookup-limit.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 5b66a17320f9b7..ac787783047767 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: "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 removed in GitLab 16.7. Until GitLab 16.7, `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. -- GitLab From 1c3b1b524a7d5b0ee62e3ebb71ecde63fb1a0f41 Mon Sep 17 00:00:00 2001 From: bmarjanovic Date: Thu, 16 Nov 2023 15:59:52 +0100 Subject: [PATCH 5/5] Fix deprecation docs --- doc/update/deprecations.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/update/deprecations.md b/doc/update/deprecations.md index cd357bd3f048b1..6431b8a70124da 100644 --- a/doc/update/deprecations.md +++ b/doc/update/deprecations.md @@ -1328,16 +1328,16 @@ To prepare for GitLab 15.8 and later, you should:
-### user_email_lookup_limit API field +### `user_email_lookup_limit` API field
- Announced in GitLab 14.9 - Removal in GitLab 16.7 ([breaking change](https://docs.gitlab.com/ee/update/terminology.html#breaking-change))
-The `user_email_lookup_limit` [API field](https://docs.gitlab.com/ee/api/settings.html) is deprecated and removed in GitLab 16.7. Until GitLab 16.7, `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.
-- GitLab