summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Cai <jcai@gitlab.com>2019-03-05 09:09:48 -0800
committerJohn Cai <jcai@gitlab.com>2019-03-06 10:11:44 -0800
commit3a30dffd3e1753aadab0b451fb50ec7ef5cebc53 (patch)
tree599902369c44492cb74840ddd53e5a8482c7cca3
parent3fe2804cc2dd76f65630e7f8c9afb0c52b53aa09 (diff)
downloadgitlab-ce-jc-feature-flag-find-all-tags.tar.gz
Check that feature database and table exists for gitaly featuresjc-feature-flag-find-all-tags
-rw-r--r--lib/gitlab/gitaly_client.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/gitaly_client.rb b/lib/gitlab/gitaly_client.rb
index e266dfceab9..7d60e934667 100644
--- a/lib/gitlab/gitaly_client.rb
+++ b/lib/gitlab/gitaly_client.rb
@@ -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