Commit 7e7fff7b authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg Committed by Douglas Barbosa Alexandre

Allow Gitaly to work without a PG connection

Gitaly didn't require a PG connection to connect to, though recently we
started to pass feature flags to Gitaly in different manners. That
change would now require a PG to be running. This is not ideal,
especially if only for feature flags.

This change rescues a bad connection error, and breaks the required
dependency between PG and Gitaly.

Closes https://gitlab.com/gitlab-org/gitlab/issues/34205
parent 68e1d5f6
---
title: Remove required dependecy of Postgresql for Gitaly
merge_request: 18659
author:
type: other
......@@ -19,7 +19,7 @@ class Feature
default_on = DEFAULT_ON_FLAGS.include?(feature_flag)
Feature.enabled?("gitaly_#{feature_flag}", default_enabled: default_on)
rescue ActiveRecord::NoDatabaseError
rescue ActiveRecord::NoDatabaseError, PG::ConnectionBad
false
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment