Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Strokov <pstrokov@gitlab.com>2023-02-14 01:08:59 +0300
committerPavlo Strokov <pstrokov@gitlab.com>2023-04-13 09:15:42 +0300
commit2b1e72ada39efdc7e0d507868339061d25b98e75 (patch)
tree176b2781a376d83e0354b8dee681d6c53d25d792
parent9255b4522513ee91d7fef535137d57deb498bbf8 (diff)
Praefect: Clean up deprecated FailoverEnabled field
The 'FailoverEnabled' field of the 'Config' was deprecated long time ago. It was kept for backwards compatibility with omnibus. The change done in https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/4048 allows us to drop it completely.
-rw-r--r--internal/praefect/config/config.go18
1 files changed, 5 insertions, 13 deletions
diff --git a/internal/praefect/config/config.go b/internal/praefect/config/config.go
index 17ed0e478..79aff30e3 100644
--- a/internal/praefect/config/config.go
+++ b/internal/praefect/config/config.go
@@ -155,13 +155,11 @@ type Config struct {
Auth auth.Config `toml:"auth,omitempty"`
TLS config.TLS `toml:"tls,omitempty"`
DB `toml:"database,omitempty"`
- Failover Failover `toml:"failover,omitempty"`
- // Keep for legacy reasons: remove after Omnibus has switched
- FailoverEnabled bool `toml:"failover_enabled,omitempty"`
- MemoryQueueEnabled bool `toml:"memory_queue_enabled,omitempty"`
- GracefulStopTimeout duration.Duration `toml:"graceful_stop_timeout,omitempty"`
- RepositoriesCleanup RepositoriesCleanup `toml:"repositories_cleanup,omitempty"`
- Yamux Yamux `toml:"yamux,omitempty"`
+ Failover Failover `toml:"failover,omitempty"`
+ MemoryQueueEnabled bool `toml:"memory_queue_enabled,omitempty"`
+ GracefulStopTimeout duration.Duration `toml:"graceful_stop_timeout,omitempty"`
+ RepositoriesCleanup RepositoriesCleanup `toml:"repositories_cleanup,omitempty"`
+ Yamux Yamux `toml:"yamux,omitempty"`
}
// Yamux contains Yamux related configuration values.
@@ -236,12 +234,6 @@ func FromReader(reader io.Reader) (Config, error) {
return Config{}, err
}
- // TODO: Remove this after failover_enabled has moved under a separate failover section. This is for
- // backwards compatibility only
- if conf.FailoverEnabled {
- conf.Failover.Enabled = true
- }
-
conf.setDefaults()
return *conf, nil