Skip to content

Commit

Permalink
fix: CurClusterOnly cause logic cluster loss
Browse files Browse the repository at this point in the history
  • Loading branch information
YenchangChan committed Aug 26, 2024
1 parent 70f742a commit dbd095c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions deploy/ck.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ func (d *CKDeploy) Config() error {
d.Conf.Normalize()
confFiles := make([]string, 0)

if d.Conf.LogicCluster == nil || d.Ext.CurClusterOnly {
if d.Conf.LogicCluster == nil {
metrika, err := ckconfig.GenerateMetrikaXML(path.Join(config.GetWorkDirectory(), "package", "metrika.xml"), d.Conf)
if err != nil {
return err
Expand Down Expand Up @@ -446,9 +446,12 @@ func (d *CKDeploy) Config() error {
if lastError != nil {
return lastError
}
if !d.Ext.CurClusterOnly && d.Conf.LogicCluster != nil {
if d.Conf.LogicCluster != nil {
logicMetrika, deploys := GenLogicMetrika(d)
for _, deploy := range deploys {
if d.Ext.CurClusterOnly && d.Conf.Cluster != deploy.Conf.Cluster {
continue
}
deploy.Conf.Normalize()
metrikaFile, err := common.NewTempFile(path.Join(config.GetWorkDirectory(), "package"), "metrika")
if err != nil {
Expand Down

0 comments on commit dbd095c

Please sign in to comment.