Skip to content

Commit

Permalink
roachtest/multitenant-upgrade: hard-code predecessor version temporarily
Browse files Browse the repository at this point in the history
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
  • Loading branch information
healthy-pod committed Aug 8, 2023
1 parent 1382b26 commit ed2bad4
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions pkg/cmd/roachtest/tests/multitenant_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"context"
gosql "database/sql"
"fmt"
"strconv"
"strings"
"time"

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

predecessor, err := release.LatestPredecessor(v)
require.NoError(t, err)
getPredecessorVersion := func() string {
predecessor, err := release.LatestPredecessor(v)
require.NoError(t, err)

// Hard-code the pre-decessor release to 23.1.4 if 23.1.9 is not out yet because
// the test is in-compatible with 23.1.{5,6,7,8} due to an erroneous PR merged on the 23.1 branch.
// See https://github.com/cockroachdb/cockroach/pull/108202 for more context.
parsedPredecessor := strings.Split(predecessor, ".")
major := parsedPredecessor[0]
minor := parsedPredecessor[1]
patch, err := strconv.Atoi(parsedPredecessor[2])
require.NoError(t, err)
if major == "23" && minor == "1" && patch < 9 {
predecessor = "23.1.4"
}
return predecessor
}

predecessor := getPredecessorVersion()
currentBinary := uploadVersion(ctx, t, c, c.All(), clusterupgrade.MainVersion)
predecessorBinary := uploadVersion(ctx, t, c, c.All(), predecessor)

Expand Down

0 comments on commit ed2bad4

Please sign in to comment.