Skip to content

Commit 0bb47e5

Browse files
committed
fix: minor version upgrade SGDbOps fails to perform minor version upgrade
1 parent 1b43a3a commit 0bb47e5

2 files changed

Lines changed: 2 additions & 53 deletions

File tree

stackgres-k8s/src/common/src/main/java/io/stackgres/common/crd/sgcluster/StackGresClusterDbOpsMinorVersionUpgradeStatus.java

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@
55

66
package io.stackgres.common.crd.sgcluster;
77

8-
import java.util.Objects;
9-
108
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
119
import com.fasterxml.jackson.annotation.JsonInclude;
1210
import io.quarkus.runtime.annotations.RegisterForReflection;
1311
import io.stackgres.common.StackGresUtil;
1412
import io.sundr.builder.annotations.Buildable;
15-
import jakarta.validation.constraints.NotNull;
1613

1714
@RegisterForReflection
1815
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
@@ -22,34 +19,9 @@
2219
builderPackage = "io.fabric8.kubernetes.api.builder")
2320
public class StackGresClusterDbOpsMinorVersionUpgradeStatus extends ClusterDbOpsRestartStatus {
2421

25-
@NotNull
26-
private String sourcePostgresVersion;
27-
28-
@NotNull
29-
private String targetPostgresVersion;
30-
31-
public String getSourcePostgresVersion() {
32-
return sourcePostgresVersion;
33-
}
34-
35-
public void setSourcePostgresVersion(String sourcePostgresVersion) {
36-
this.sourcePostgresVersion = sourcePostgresVersion;
37-
}
38-
39-
public String getTargetPostgresVersion() {
40-
return targetPostgresVersion;
41-
}
42-
43-
public void setTargetPostgresVersion(String targetPostgresVersion) {
44-
this.targetPostgresVersion = targetPostgresVersion;
45-
}
46-
4722
@Override
4823
public int hashCode() {
49-
final int prime = 31;
50-
int result = super.hashCode();
51-
result = prime * result + Objects.hash(sourcePostgresVersion, targetPostgresVersion);
52-
return result;
24+
return super.hashCode();
5325
}
5426

5527
@Override
@@ -63,10 +35,7 @@ public boolean equals(Object obj) {
6335
if (!(obj instanceof StackGresClusterDbOpsMinorVersionUpgradeStatus)) {
6436
return false;
6537
}
66-
StackGresClusterDbOpsMinorVersionUpgradeStatus other =
67-
(StackGresClusterDbOpsMinorVersionUpgradeStatus) obj;
68-
return Objects.equals(sourcePostgresVersion, other.sourcePostgresVersion)
69-
&& Objects.equals(targetPostgresVersion, other.targetPostgresVersion);
38+
return true;
7039
}
7140

7241
@Override

stackgres-k8s/src/restapi/src/main/java/io/stackgres/apiweb/dto/dbops/DbOpsMinorVersionUpgradeStatus.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
1616
public class DbOpsMinorVersionUpgradeStatus {
1717

18-
private String sourcePostgresVersion;
19-
20-
private String targetPostgresVersion;
21-
2218
private String primaryInstance;
2319

2420
private List<String> initialInstances;
@@ -33,22 +29,6 @@ public class DbOpsMinorVersionUpgradeStatus {
3329

3430
private String failure;
3531

36-
public String getSourcePostgresVersion() {
37-
return sourcePostgresVersion;
38-
}
39-
40-
public void setSourcePostgresVersion(String sourcePostgresVersion) {
41-
this.sourcePostgresVersion = sourcePostgresVersion;
42-
}
43-
44-
public String getTargetPostgresVersion() {
45-
return targetPostgresVersion;
46-
}
47-
48-
public void setTargetPostgresVersion(String targetPostgresVersion) {
49-
this.targetPostgresVersion = targetPostgresVersion;
50-
}
51-
5232
public String getPrimaryInstance() {
5333
return primaryInstance;
5434
}

0 commit comments

Comments
 (0)