From 3566cc3b5d6d25cdcb7c193a6897c0427bdc4287 Mon Sep 17 00:00:00 2001 From: Allen Zhong Date: Tue, 6 Apr 2021 15:17:03 +0800 Subject: [PATCH] fix: workaround for nightly versions in checkConfig() --- pkg/cluster/spec/server_config.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/cluster/spec/server_config.go b/pkg/cluster/spec/server_config.go index 4e97fea761..4944995b8b 100644 --- a/pkg/cluster/spec/server_config.go +++ b/pkg/cluster/spec/server_config.go @@ -264,9 +264,14 @@ func checkConfig(ctx context.Context, e ctxt.Executor, componentName, clusterVer return perrs.Annotate(ErrorCheckConfig, err.Error()) } + clsVer := utils.Version(clusterVersion) ver := clusterVersion + if clsVer.IsNightly() { + ver = utils.NightlyVersionAlias + } + // FIXME: workaround for nightly versions, need refactor if bindVersion != nil { - ver = bindVersion(componentName, clusterVersion) + ver = bindVersion(componentName, ver) } entry, err := repo.ComponentBinEntry(componentName, ver)