Skip to content

Commit

Permalink
Fix tiup dm patch can't detect correct version (#884)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucklove committed Nov 19, 2020
1 parent d7fa3f6 commit c7c4494
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/cluster/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -1758,12 +1758,12 @@ func instancesToPatch(topo spec.Topology, options operator.Options) ([]spec.Inst
}

func checkPackage(bindVersion spec.BindVersion, specManager *spec.SpecManager, clusterName, comp, nodeOS, arch, packagePath string) error {
metadata, err := spec.ClusterMetadata(clusterName)
if err != nil && !errors.Is(perrs.Cause(err), meta.ErrValidate) {
metadata := specManager.NewMetadata()
if err := specManager.Metadata(clusterName, metadata); err != nil {
return err
}

ver := bindVersion(comp, metadata.Version)
ver := bindVersion(comp, metadata.GetBaseMeta().Version)
repo, err := clusterutil.NewRepository(nodeOS, arch)
if err != nil {
return err
Expand Down

0 comments on commit c7c4494

Please sign in to comment.