Skip to content

Commit ed2bad4

Browse files
author
healthy-pod
committed
roachtest/multitenant-upgrade: hard-code predecessor version temporarily
Hard-code the pre-decessor release to 23.1.4 until a new patch release is out (23.1.9) because the test is in-compatible with 23.1.{5,6,7,8} due to an erroneous PR merged on the 23.1 branch. Release note: None Epic: none
1 parent 1382b26 commit ed2bad4

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

pkg/cmd/roachtest/tests/multitenant_upgrade.go

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
"context"
1515
gosql "database/sql"
1616
"fmt"
17+
"strconv"
1718
"strings"
1819
"time"
1920

@@ -82,9 +83,25 @@ func runMultiTenantUpgrade(
8283
currentBinaryMinSupportedVersion, ok := versionToMinSupportedVersion[curBinaryMajorAndMinorVersion]
8384
require.True(t, ok, "current binary '%s' not found in 'versionToMinSupportedVersion' map", curBinaryMajorAndMinorVersion)
8485

85-
predecessor, err := release.LatestPredecessor(v)
86-
require.NoError(t, err)
86+
getPredecessorVersion := func() string {
87+
predecessor, err := release.LatestPredecessor(v)
88+
require.NoError(t, err)
89+
90+
// Hard-code the pre-decessor release to 23.1.4 if 23.1.9 is not out yet because
91+
// the test is in-compatible with 23.1.{5,6,7,8} due to an erroneous PR merged on the 23.1 branch.
92+
// See https://github.com/cockroachdb/cockroach/pull/108202 for more context.
93+
parsedPredecessor := strings.Split(predecessor, ".")
94+
major := parsedPredecessor[0]
95+
minor := parsedPredecessor[1]
96+
patch, err := strconv.Atoi(parsedPredecessor[2])
97+
require.NoError(t, err)
98+
if major == "23" && minor == "1" && patch < 9 {
99+
predecessor = "23.1.4"
100+
}
101+
return predecessor
102+
}
87103

104+
predecessor := getPredecessorVersion()
88105
currentBinary := uploadVersion(ctx, t, c, c.All(), clusterupgrade.MainVersion)
89106
predecessorBinary := uploadVersion(ctx, t, c, c.All(), predecessor)
90107

0 commit comments

Comments
 (0)