Skip to content

Commit d746a8b

Browse files
committed
mixedversion: remove special case for skipping current version
In the past, we used to bump CRDB's minSupportedVersion _before_ bumping CRDB's current version. Consider the old version bump process: 1. Bump minimum supported version (e.g. 25.2→25.3) 2. Bump current version (e.g. 25.4→26.1) 3. Bump minimum supported version again (e.g. 25.3→25.4) After the first step, we would be in a state where the mixed version framework would see v25.3 as a skippable version (.1 and .3 ordinal versions are skippable), but since the minimum supported version is 25.3, 25.2→25.4 is (temporarily) not a legal upgrade. This required a special case to disallow skip upgrades in the case of this edge case. However, we now bump the current version _first_. This means we no longer need to protect against the above and we actually hit a different bug. Since we now bump the current version first, the special case will always view the current version as having multiple supported predecessors and force a skip upgrade even if not applicable.
1 parent ae0b3d7 commit d746a8b

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

pkg/cmd/roachtest/roachtestutil/mixedversion/mixedversion.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ import (
7979
"sync"
8080
"time"
8181

82-
"github.com/cockroachdb/cockroach/pkg/clusterversion"
8382
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/cluster"
8483
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/option"
8584
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/registry"
@@ -94,7 +93,6 @@ import (
9493
"github.com/cockroachdb/cockroach/pkg/testutils/release"
9594
"github.com/cockroachdb/cockroach/pkg/util/randutil"
9695
"github.com/cockroachdb/errors"
97-
"github.com/cockroachdb/version"
9896
)
9997

10098
const (
@@ -613,14 +611,6 @@ func (t *Test) supportsSkipUpgradeTo(pred, v *clusterupgrade.Version) bool {
613611
if t.options.minimumSupportedVersion.Series() == pred.Series() {
614612
return false
615613
}
616-
// Special case for the current release series. This is useful to keep the
617-
// test correct when we bump the minimum supported version separately from
618-
// the current version.
619-
r := clusterversion.Latest.ReleaseSeries()
620-
currentMajor := version.MajorVersion{Year: int(r.Major), Ordinal: int(r.Minor)}
621-
if currentMajor.Equals(v.Version.Major()) {
622-
return len(clusterversion.SupportedPreviousReleases()) > 1
623-
}
624614

625615
series := v.Version.Major()
626616
switch {

0 commit comments

Comments
 (0)