From ebce0764a0eb637a2d0407e27a6d0b47dc6b4fc0 Mon Sep 17 00:00:00 2001 From: Doug Stull <dstull@gitlab.com> Date: Wed, 19 Jul 2023 11:07:15 -0400 Subject: [PATCH] Remove use and ignore dashboard_notification_limit - start drop column process --- app/models/application_setting.rb | 1 + ee/app/models/ee/application_setting.rb | 2 -- ee/spec/models/application_setting_spec.rb | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index 827f8bc93bef8..2c47404b0e345 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -39,6 +39,7 @@ class ApplicationSetting < MainClusterwide::ApplicationRecord encrypted_tofa_url_iv vertex_project ], remove_with: '16.3', remove_after: '2023-07-22' + ignore_column :dashboard_notification_limit, remove_with: '16.5', remove_after: '2023-08-22' INSTANCE_REVIEW_MIN_USERS = 50 GRAFANA_URL_ERROR_MESSAGE = 'Please check your Grafana URL setting in ' \ diff --git a/ee/app/models/ee/application_setting.rb b/ee/app/models/ee/application_setting.rb index 51e6bb69b9c7d..8af5fe9916577 100644 --- a/ee/app/models/ee/application_setting.rb +++ b/ee/app/models/ee/application_setting.rb @@ -149,7 +149,6 @@ module ApplicationSetting with_options(presence: true, numericality: { only_integer: true, greater_than_or_equal_to: 0 }) do validates :dashboard_limit - validates :dashboard_notification_limit validates :dashboard_enforcement_limit end @@ -231,7 +230,6 @@ def defaults custom_project_templates_group_id: nil, dashboard_limit_enabled: false, dashboard_limit: 0, - dashboard_notification_limit: 0, dashboard_enforcement_limit: 0, dashboard_limit_new_namespace_creation_enforcement_date: nil, default_project_deletion_protection: false, diff --git a/ee/spec/models/application_setting_spec.rb b/ee/spec/models/application_setting_spec.rb index 15a39eff3c763..2713c863848bf 100644 --- a/ee/spec/models/application_setting_spec.rb +++ b/ee/spec/models/application_setting_spec.rb @@ -156,7 +156,6 @@ describe 'dashboard', feature_category: :metrics do it { is_expected.to validate_numericality_of(:dashboard_limit).only_integer.is_greater_than_or_equal_to(0) } - it { is_expected.to validate_numericality_of(:dashboard_notification_limit).only_integer.is_greater_than_or_equal_to(0) } it { is_expected.to validate_numericality_of(:dashboard_enforcement_limit).only_integer.is_greater_than_or_equal_to(0) } it { is_expected.to allow_value(true, false).for(:dashboard_limit_enabled) } it { is_expected.not_to allow_value(nil).for(:dashboard_limit_enabled) } -- GitLab