Verified Commit 754ff888 authored by Tomasz Maczukin's avatar Tomasz Maczukin
Browse files

Add few TODOs to mark things that should be cleaned in 12.0

parent 74085754
Pipeline #29601464 passed with stages
in 28 minutes and 29 seconds
......@@ -72,8 +72,10 @@ func (c *configOptions) RunnerByName(name string) (*common.RunnerConfig, error)
type configOptionsWithListenAddress struct {
configOptions
ListenAddress string `long:"listen-address" env:"LISTEN_ADDRESS" description:"Metrics / pprof server listening address"`
// TODO: Remove in 12.0
MetricsServerAddress string `long:"metrics-server" env:"METRICS_SERVER" description:"(DEPRECATED) Metrics / pprof server listening address"` //DEPRECATED
ListenAddress string `long:"listen-address" env:"LISTEN_ADDRESS" description:"Metrics / pprof server listening address"`
}
func (c *configOptionsWithListenAddress) listenAddress() (string, error) {
......@@ -99,6 +101,7 @@ func (c *configOptionsWithListenAddress) listenOrMetricsServerAddress() string {
return c.ListenAddress
}
// TODO: Remove in 12.0
if c.MetricsServerAddress != "" {
logrus.Warnln("'metrics-server' command line option is deprecated and will be removed in one of future releases; please use 'listen-address' instead")
......
......@@ -294,11 +294,12 @@ type SessionServer struct {
}
type Config struct {
MetricsServerAddress string `toml:"metrics_server,omitempty" json:"metrics_server"` // DEPRECATED
ListenAddress string `toml:"listen_address,omitempty" json:"listen_address"`
ListenAddress string `toml:"listen_address,omitempty" json:"listen_address"`
SessionServer SessionServer `toml:"session_server,omitempty" json:"session_server"`
// TODO: Remove in 12.0
MetricsServerAddress string `toml:"metrics_server,omitempty" json:"metrics_server"` // DEPRECATED
Concurrent int `toml:"concurrent" json:"concurrent"`
CheckInterval int `toml:"check_interval" json:"check_interval" description:"Define active checking interval of jobs"`
LogLevel *string `toml:"log_level" json:"log_level" description:"Define log level (one of: panic, fatal, error, warning, info, debug)"`
......@@ -570,6 +571,7 @@ func (c *Config) ListenOrServerMetricAddress() string {
return c.ListenAddress
}
// TODO: Remove in 12.0
if c.MetricsServerAddress != "" {
log.Warnln("'metrics_server' configuration entry is deprecated and will be removed in one of future releases; please use 'listen_address' instead")
}
......
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