diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2019-06-05 23:24:38 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2019-06-07 14:32:31 +0300 |
commit | 15ba85ab8e6c0f3dd18663233fd86bcb3bde4e73 (patch) | |
tree | 2b7f923813d9d9db1c9be6fe16a9f90f68205e9c /app | |
parent | bb4919103116aa6aa7cf851fc29a8841ffd78026 (diff) | |
download | gitlab-ce-15ba85ab8e6c0f3dd18663233fd86bcb3bde4e73.tar.gz |
Remove some deprecated codedz-cleanup-deprecated-code
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app')
-rw-r--r-- | app/finders/issuable_finder.rb | 8 | ||||
-rw-r--r-- | app/models/broadcast_message.rb | 11 | ||||
-rw-r--r-- | app/models/label.rb | 1 |
3 files changed, 3 insertions, 17 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb index 50e9418677c..3592505a977 100644 --- a/app/finders/issuable_finder.rb +++ b/app/finders/issuable_finder.rb @@ -43,7 +43,7 @@ class IssuableFinder FILTER_NONE = 'none'.freeze FILTER_ANY = 'any'.freeze - # This is accepted as a deprecated filter and is also used in unassigning users + # This is used in unassigning users NONE = '0'.freeze attr_accessor :current_user, :params @@ -248,8 +248,7 @@ class IssuableFinder def filter_by_no_label? downcased = label_names.map(&:downcase) - # Label::NONE is deprecated and should be removed in 12.0 - downcased.include?(FILTER_NONE) || downcased.include?(Label::NONE) + downcased.include?(FILTER_NONE) end def filter_by_any_label? @@ -449,8 +448,7 @@ class IssuableFinder # rubocop: enable CodeReuse/ActiveRecord def filter_by_no_assignee? - # Assignee_id takes precedence over assignee_username - [NONE, FILTER_NONE].include?(params[:assignee_id].to_s.downcase) || params[:assignee_username].to_s == NONE + params[:assignee_id].to_s.downcase == FILTER_NONE end def filter_by_any_assignee? diff --git a/app/models/broadcast_message.rb b/app/models/broadcast_message.rb index 18fe2a9624f..0fd8dca70b4 100644 --- a/app/models/broadcast_message.rb +++ b/app/models/broadcast_message.rb @@ -17,13 +17,11 @@ class BroadcastMessage < ApplicationRecord default_value_for :font, '#FFFFFF' CACHE_KEY = 'broadcast_message_current_json'.freeze - LEGACY_CACHE_KEY = 'broadcast_message_current'.freeze after_commit :flush_redis_cache def self.current messages = cache.fetch(CACHE_KEY, as: BroadcastMessage, expires_in: cache_expires_in) do - remove_legacy_cache_key current_and_future_messages end @@ -50,14 +48,6 @@ class BroadcastMessage < ApplicationRecord nil end - # This can be removed in GitLab 12.0+ - # The old cache key had an indefinite lifetime, and in an HA - # environment a one-shot migration would not work because the cache - # would be repopulated by a node that has not been upgraded. - def self.remove_legacy_cache_key - cache.expire(LEGACY_CACHE_KEY) - end - def active? started? && !ended? end @@ -84,6 +74,5 @@ class BroadcastMessage < ApplicationRecord def flush_redis_cache self.class.cache.expire(CACHE_KEY) - self.class.remove_legacy_cache_key end end diff --git a/app/models/label.rb b/app/models/label.rb index e9085e8bd25..b83e0862bab 100644 --- a/app/models/label.rb +++ b/app/models/label.rb @@ -13,7 +13,6 @@ class Label < ApplicationRecord cache_markdown_field :description, pipeline: :single_line DEFAULT_COLOR = '#428BCA' - NONE = 'no label' default_value_for :color, DEFAULT_COLOR |