diff options
author | Roger Meier <r.meier@siemens.com> | 2019-04-30 22:06:08 +0200 |
---|---|---|
committer | Roger Meier <r.meier@siemens.com> | 2019-06-25 21:17:19 +0200 |
commit | 946ffc67b711b39512a789213779d2736fcc0049 (patch) | |
tree | 661cfd4c18767c9972ca7775e7c8e4d1f1586544 /app/models | |
parent | 76889a9956e76e300edc8993048c3cd5c3a24da0 (diff) | |
download | gitlab-ce-946ffc67b711b39512a789213779d2736fcc0049.tar.gz |
refactor: remove Sentry from application settings
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/application_setting.rb | 13 | ||||
-rw-r--r-- | app/models/application_setting_implementation.rb | 21 |
2 files changed, 4 insertions, 30 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index bbe2d2e8fd4..cd645850af3 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -30,6 +30,10 @@ class ApplicationSetting < ApplicationRecord ignore_column :circuitbreaker_check_interval ignore_column :koding_url ignore_column :koding_enabled + ignore_column :sentry_enabled + ignore_column :sentry_dsn + ignore_column :clientside_sentry_enabled + ignore_column :clientside_sentry_dsn cache_markdown_field :sign_in_text cache_markdown_field :help_page_text @@ -75,14 +79,6 @@ class ApplicationSetting < ApplicationRecord presence: true, if: :recaptcha_enabled - validates :sentry_dsn, - presence: true, - if: :sentry_enabled - - validates :clientside_sentry_dsn, - presence: true, - if: :clientside_sentry_enabled - validates :akismet_api_key, presence: true, if: :akismet_enabled @@ -264,7 +260,6 @@ class ApplicationSetting < ApplicationRecord encode: true before_validation :ensure_uuid! - before_validation :strip_sentry_values before_save :ensure_runners_registration_token before_save :ensure_health_check_access_token diff --git a/app/models/application_setting_implementation.rb b/app/models/application_setting_implementation.rb index cf328bcd994..df4caed175d 100644 --- a/app/models/application_setting_implementation.rb +++ b/app/models/application_setting_implementation.rb @@ -180,27 +180,6 @@ module ApplicationSettingImplementation super(levels&.map { |level| Gitlab::VisibilityLevel.level_value(level) }) end - def strip_sentry_values - sentry_dsn.strip! if sentry_dsn.present? - clientside_sentry_dsn.strip! if clientside_sentry_dsn.present? - end - - def sentry_enabled - Gitlab.config.sentry.enabled || read_attribute(:sentry_enabled) - end - - def sentry_dsn - Gitlab.config.sentry.dsn || read_attribute(:sentry_dsn) - end - - def clientside_sentry_enabled - Gitlab.config.sentry.enabled || read_attribute(:clientside_sentry_enabled) - end - - def clientside_sentry_dsn - Gitlab.config.sentry.clientside_dsn || read_attribute(:clientside_sentry_dsn) - end - def performance_bar_allowed_group Group.find_by_id(performance_bar_allowed_group_id) end |