Merge pull request #99187 from CaoDonghui123/fixKubeadm-1

Delete duplicate logs for kubeadm upgrade versions
This commit is contained in:
Kubernetes Prow Robot 2021-02-21 15:19:41 -08:00 committed by GitHub
commit 972ae2f2c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,6 @@ package upgrade
import (
"context"
"fmt"
"github.com/pkg/errors"
"k8s.io/api/core/v1"
@ -134,11 +133,7 @@ func NewOfflineVersionGetter(versionGetter VersionGetter, version string) Versio
// VersionFromCILabel will return the version that was passed into the struct
func (o *OfflineVersionGetter) VersionFromCILabel(ciVersionLabel, description string) (string, *versionutil.Version, error) {
if o.version == "" {
versionStr, version, err := o.VersionGetter.VersionFromCILabel(ciVersionLabel, description)
if err == nil {
fmt.Printf("[upgrade/versions] Latest %s: %s\n", description, versionStr)
}
return versionStr, version, err
return o.VersionGetter.VersionFromCILabel(ciVersionLabel, description)
}
ver, err := versionutil.ParseSemantic(o.version)
if err != nil {