Skip to content

Commit d5cb2b2

Browse files
testwillhorsegegunes
authored
chore: pkg imported more than once (#1263)
Co-authored-by: Viacheslav Sarzhan <[email protected]> Co-authored-by: Ege Güneş <[email protected]>
1 parent 87069b0 commit d5cb2b2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pkg/controller/perconaservermongodb/version.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import (
1919

2020
"github.com/percona/percona-backup-mongodb/pbm"
2121
api "github.com/percona/percona-server-mongodb-operator/pkg/apis/psmdb/v1"
22-
v1 "github.com/percona/percona-server-mongodb-operator/pkg/apis/psmdb/v1"
2322
"github.com/percona/percona-server-mongodb-operator/pkg/k8s"
2423
)
2524

@@ -70,7 +69,7 @@ func (r *ReconcilePerconaServerMongoDB) scheduleEnsureVersion(ctx context.Contex
7069
return
7170
}
7271

73-
if localCr.Status.State != v1.AppStateReady {
72+
if localCr.Status.State != api.AppStateReady {
7473
log.Info("cluster is not ready")
7574
return
7675
}
@@ -149,7 +148,7 @@ func MajorMinor(ver *v.Version) string {
149148
}
150149

151150
func majorUpgradeRequested(cr *api.PerconaServerMongoDB, fcv string) (UpgradeRequest, error) {
152-
if len(cr.Spec.UpgradeOptions.Apply) == 0 || v1.OneOfUpgradeStrategy(string(cr.Spec.UpgradeOptions.Apply)) {
151+
if len(cr.Spec.UpgradeOptions.Apply) == 0 || api.OneOfUpgradeStrategy(string(cr.Spec.UpgradeOptions.Apply)) {
153152
return UpgradeRequest{false, "", ""}, nil
154153
}
155154

@@ -335,7 +334,7 @@ func (r *ReconcilePerconaServerMongoDB) ensureVersion(ctx context.Context, cr *a
335334
return nil
336335
}
337336

338-
if cr.Status.State != v1.AppStateReady && cr.Status.MongoVersion != "" {
337+
if cr.Status.State != api.AppStateReady && cr.Status.MongoVersion != "" {
339338
return errors.New("cluster is not ready")
340339
}
341340

0 commit comments

Comments
 (0)