Skip to content

Commit

Permalink
chore: pkg imported more than once (#1263)
Browse files Browse the repository at this point in the history
Co-authored-by: Viacheslav Sarzhan <[email protected]>
Co-authored-by: Ege Güneş <[email protected]>
  • Loading branch information
3 people authored Sep 8, 2023
1 parent 87069b0 commit d5cb2b2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/controller/perconaservermongodb/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (

"github.com/percona/percona-backup-mongodb/pbm"
api "github.com/percona/percona-server-mongodb-operator/pkg/apis/psmdb/v1"
v1 "github.com/percona/percona-server-mongodb-operator/pkg/apis/psmdb/v1"
"github.com/percona/percona-server-mongodb-operator/pkg/k8s"
)

Expand Down Expand Up @@ -70,7 +69,7 @@ func (r *ReconcilePerconaServerMongoDB) scheduleEnsureVersion(ctx context.Contex
return
}

if localCr.Status.State != v1.AppStateReady {
if localCr.Status.State != api.AppStateReady {
log.Info("cluster is not ready")
return
}
Expand Down Expand Up @@ -149,7 +148,7 @@ func MajorMinor(ver *v.Version) string {
}

func majorUpgradeRequested(cr *api.PerconaServerMongoDB, fcv string) (UpgradeRequest, error) {
if len(cr.Spec.UpgradeOptions.Apply) == 0 || v1.OneOfUpgradeStrategy(string(cr.Spec.UpgradeOptions.Apply)) {
if len(cr.Spec.UpgradeOptions.Apply) == 0 || api.OneOfUpgradeStrategy(string(cr.Spec.UpgradeOptions.Apply)) {
return UpgradeRequest{false, "", ""}, nil
}

Expand Down Expand Up @@ -335,7 +334,7 @@ func (r *ReconcilePerconaServerMongoDB) ensureVersion(ctx context.Context, cr *a
return nil
}

if cr.Status.State != v1.AppStateReady && cr.Status.MongoVersion != "" {
if cr.Status.State != api.AppStateReady && cr.Status.MongoVersion != "" {
return errors.New("cluster is not ready")
}

Expand Down

0 comments on commit d5cb2b2

Please sign in to comment.