Merge branch 'jc-feature-flag-find-all-tags' into 'master'

Add feature flag for FindAllTags

See merge request gitlab-org/gitlab-ce!25615
This commit is contained in:
Lin Jen-Shin 2019-03-07 07:39:34 +00:00
commit 1557289ce3

View file

@ -228,7 +228,7 @@ module Gitlab
result
end
SERVER_FEATURE_FLAGS = %w[].freeze
SERVER_FEATURE_FLAGS = %w[go-find-all-tags].freeze
def self.server_feature_flags
SERVER_FEATURE_FLAGS.map do |f|
@ -244,7 +244,9 @@ module Gitlab
end
def self.feature_enabled?(feature_name)
Feature.enabled?("gitaly_#{feature_name}")
Feature::FlipperFeature.table_exists? && Feature.enabled?("gitaly_#{feature_name}")
rescue ActiveRecord::NoDatabaseError
false
end
# Ensures that Gitaly is not being abuse through n+1 misuse etc