From 4677c107ef0ae898686b4a14c76cf72bf2719de6 Mon Sep 17 00:00:00 2001 From: Andrew Richardson Date: Tue, 28 Jun 2022 15:33:33 -0400 Subject: [PATCH] Deprecate default value for "ffdx" Signed-off-by: Andrew Richardson --- internal/coreconfig/coreconfig.go | 1 - internal/orchestrator/orchestrator.go | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/coreconfig/coreconfig.go b/internal/coreconfig/coreconfig.go index 27d6d853a..3baa0e098 100644 --- a/internal/coreconfig/coreconfig.go +++ b/internal/coreconfig/coreconfig.go @@ -312,7 +312,6 @@ func setDefaults() { viper.SetDefault(string(CorsAllowedOrigins), []string{"*"}) viper.SetDefault(string(CorsEnabled), true) viper.SetDefault(string(CorsMaxAge), 600) - viper.SetDefault(string(DataexchangeType), "ffdx") viper.SetDefault(string(HistogramsMaxChartRows), 100) viper.SetDefault(string(DebugPort), -1) viper.SetDefault(string(DownloadWorkerCount), 10) diff --git a/internal/orchestrator/orchestrator.go b/internal/orchestrator/orchestrator.go index aebf317b0..0daa5fc68 100644 --- a/internal/orchestrator/orchestrator.go +++ b/internal/orchestrator/orchestrator.go @@ -359,6 +359,10 @@ func (or *orchestrator) initDatabaseCheckPreinit(ctx context.Context) (err error func (or *orchestrator) initDataExchange(ctx context.Context) (err error) { dxPlugin := config.GetString(coreconfig.DataexchangeType) + if dxPlugin == "" { + dxPlugin = "ffdx" + log.L(ctx).Warnf("The default value for %s has been deprecated - please explicitly set it to \"ffdx\"", coreconfig.DataexchangeType) + } if or.dataexchange == nil { pluginName := dxPlugin if or.dataexchange, err = dxfactory.GetPlugin(ctx, pluginName); err != nil {