Skip to content

Commit

Permalink
remove version
Browse files Browse the repository at this point in the history
Signed-off-by: husharp <[email protected]>
  • Loading branch information
HuSharp committed Jul 15, 2024
1 parent 85d1ec0 commit 115f047
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion components/playground/instance/drainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (d *Drainer) NodeID() string {
}

// Start implements Instance interface.
func (d *Drainer) Start(ctx context.Context, _ utils.Version) error {
func (d *Drainer) Start(ctx context.Context) error {
endpoints := pdEndpoints(d.pds, true)

args := []string{
Expand Down
4 changes: 2 additions & 2 deletions components/playground/instance/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ type Instance interface {
Pid() int
// Start the instance process.
// Will kill the process once the context is done.
Start(ctx context.Context, version utils.Version) error
Start(ctx context.Context) error
// Component Return the component name.
Component() string
// LogFile return the log file name
Expand Down Expand Up @@ -96,8 +96,8 @@ func (inst *instance) PrepareBinary(componentName string, version utils.Version)
if err != nil {
return err
}
inst.BinPath = instanceBinPath
inst.Version = version
inst.BinPath = instanceBinPath
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion components/playground/instance/pd.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (inst *PDInstance) Name() string {
}

// Start calls set inst.cmd and Start
func (inst *PDInstance) Start(ctx context.Context, _ utils.Version) error {
func (inst *PDInstance) Start(ctx context.Context) error {
configPath := filepath.Join(inst.Dir, "pd.toml")
if err := prepareConfig(
configPath,
Expand Down
2 changes: 1 addition & 1 deletion components/playground/instance/pump.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (p *Pump) Addr() string {
}

// Start implements Instance interface.
func (p *Pump) Start(ctx context.Context, _ utils.Version) error {
func (p *Pump) Start(ctx context.Context) error {
endpoints := pdEndpoints(p.pds, true)

args := []string{
Expand Down
2 changes: 1 addition & 1 deletion components/playground/instance/ticdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func NewTiCDC(binPath string, dir, host, configPath string, id int, port int, pd
}

// Start implements Instance interface.
func (c *TiCDC) Start(ctx context.Context, _ utils.Version) error {
func (c *TiCDC) Start(ctx context.Context) error {
endpoints := pdEndpoints(c.pds, true)

args := []string{
Expand Down
2 changes: 1 addition & 1 deletion components/playground/instance/tidb.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func NewTiDBInstance(binPath string, dir, host, configPath string, id, port int,
}

// Start calls set inst.cmd and Start
func (inst *TiDBInstance) Start(ctx context.Context, _ utils.Version) error {
func (inst *TiDBInstance) Start(ctx context.Context) error {
configPath := filepath.Join(inst.Dir, "tidb.toml")
if err := prepareConfig(
configPath,
Expand Down
6 changes: 3 additions & 3 deletions components/playground/instance/tiflash.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ func (inst *TiFlashInstance) StatusAddrs() (addrs []string) {
}

// Start calls set inst.cmd and Start
func (inst *TiFlashInstance) Start(ctx context.Context, version utils.Version) error {
if !tidbver.TiFlashPlaygroundNewStartMode(version.String()) {
return inst.startOld(ctx, version)
func (inst *TiFlashInstance) Start(ctx context.Context) error {
if !tidbver.TiFlashPlaygroundNewStartMode(inst.Version.String()) {
return inst.startOld(ctx, inst.Version)
}

proxyConfigPath := filepath.Join(inst.Dir, "tiflash_proxy.toml")
Expand Down
2 changes: 1 addition & 1 deletion components/playground/instance/tikv.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (inst *TiKVInstance) Addr() string {
}

// Start calls set inst.cmd and Start
func (inst *TiKVInstance) Start(ctx context.Context, _ utils.Version) error {
func (inst *TiKVInstance) Start(ctx context.Context) error {
configPath := filepath.Join(inst.Dir, "tikv.toml")
if err := prepareConfig(
configPath,
Expand Down
2 changes: 1 addition & 1 deletion components/playground/instance/tikv_cdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func NewTiKVCDC(binPath string, dir, host, configPath string, id int, pds []*PDI
}

// Start implements Instance interface.
func (c *TiKVCDC) Start(ctx context.Context, _ utils.Version) error {
func (c *TiKVCDC) Start(ctx context.Context) error {
endpoints := pdEndpoints(c.pds, true)

args := []string{
Expand Down
2 changes: 1 addition & 1 deletion components/playground/instance/tiproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (c *TiProxy) MetricAddr() (r MetricAddr) {
}

// Start implements Instance interface.
func (c *TiProxy) Start(ctx context.Context, _ utils.Version) error {
func (c *TiProxy) Start(ctx context.Context) error {
endpoints := pdEndpoints(c.pds, false)

configPath := filepath.Join(c.Dir, "config", "proxy.toml")
Expand Down
2 changes: 1 addition & 1 deletion components/playground/playground.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ func (p *Playground) startInstance(ctx context.Context, inst instance.Instance)
return err
}

err = inst.Start(ctx, version)
err = inst.Start(ctx)
if err != nil {
return err
}
Expand Down

0 comments on commit 115f047

Please sign in to comment.