Skip to content

Commit

Permalink
tiproxy not use nightly by default (#2305)
Browse files Browse the repository at this point in the history
  • Loading branch information
nexustar authored Nov 8, 2023
1 parent 310afd1 commit cbdaaae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions components/playground/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ If you'd like to use a TiDB version other than %s, cancel and retry with the fol
rootCmd.Flags().StringVar(&options.TiKV.BinPath, "kv.binpath", "", "TiKV instance binary path")
rootCmd.Flags().StringVar(&options.PD.BinPath, "pd.binpath", "", "PD instance binary path")
rootCmd.Flags().StringVar(&options.TiProxy.BinPath, "tiproxy.binpath", "", "TiProxy instance binary path")
rootCmd.Flags().StringVar(&options.TiProxy.Version, "tiproxy.version", "", "TiProxy instance version")
rootCmd.Flags().StringVar(&options.TiFlash.BinPath, "tiflash.binpath", "", "TiFlash instance binary path, when --mode=tidb-disagg this will set binary path for both Write Node and Compute Node")
rootCmd.Flags().StringVar(&options.TiFlashWrite.BinPath, "tiflash.write.binpath", "", "TiFlash Write instance binary path, available when --mode=tidb-disagg, take precedence over --tiflash.binpath")
rootCmd.Flags().StringVar(&options.TiFlashCompute.BinPath, "tiflash.compute.binpath", "", "TiFlash Compute instance binary path, available when --mode=tidb-disagg, take precedence over --tiflash.binpath")
Expand Down
2 changes: 1 addition & 1 deletion components/playground/playground.go
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ func (p *Playground) bindVersion(comp string, version string) (bindVersion strin
case spec.ComponentTiKVCDC:
return p.bootOptions.TiKVCDC.Version
case spec.ComponentTiProxy:
return "nightly"
return p.bootOptions.TiProxy.Version
default:
return version
}
Expand Down
6 changes: 2 additions & 4 deletions pkg/cluster/spec/tiproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,7 @@ func (c *TiProxyComponent) Role() string {
func (c *TiProxyComponent) CalculateVersion(clusterVersion string) string {
// always not follow global version, use ""(latest) by default
version := c.Topology.ComponentVersions.TiProxy
if version != "" {
return version
}
return "nightly"
return version
}

// SetVersion implements Component interface.
Expand Down Expand Up @@ -173,6 +170,7 @@ func (c *TiProxyComponent) Instances() []Instance {
UptimeFn: func(_ context.Context, timeout time.Duration, tlsCfg *tls.Config) time.Duration {
return proxyUptimeByHost(s.Host, s.StatusPort, timeout, tlsCfg)
},
Component: c,
}, c.Topology}

ins = append(ins, instance)
Expand Down

0 comments on commit cbdaaae

Please sign in to comment.