Skip to content

Commit f278b15

Browse files
committed
roachtest/mixedversion: use minimumBootstrapVersion instead of maxUpgrades
Previously, mixed versions tests that required the cluster to be started within a certain version would set the MaxUpgrades option. This works but will rot every time we advance versions. Instead this change switches those tests to use MinimumBootstrapVersion instead. Additionally the http-register-routes/mixed-versions test now sets the MinBootstrapVersion to 24.2, the oldest release that has the fix contained in #138342
1 parent a892e9d commit f278b15

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

pkg/cmd/roachtest/tests/admission_control_elastic_mixed_version.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ func registerElasticWorkloadMixedVersion(r registry.Registry) {
5656
mixedversion.AlwaysUseLatestPredecessors,
5757
// Don't go back too far. We are mostly interested in upgrading to v24.3
5858
// where RACv2 was introduced.
59-
mixedversion.MaxUpgrades(2),
60-
mixedversion.MinimumSupportedVersion("v24.1.0"),
59+
mixedversion.MinimumBootstrapVersion("v24.1.0"),
6160
)
6261

6362
// Limit the disk throughput to 128 MiB/s, to more easily stress the

pkg/cmd/roachtest/tests/validate_system_schema_after_version_upgrade.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,8 @@ func runValidateSystemSchemaAfterVersionUpgrade(
190190
ctx context.Context, t test.Test, c cluster.Cluster,
191191
) {
192192
validateSystemSchemaAfterUpgradeTest(ctx, t, c,
193-
// We limit the number of upgrades since the test is not expected to work
194-
// on versions older than 22.2.
195-
mixedversion.MaxUpgrades(3),
193+
// The test is not expected to work on versions older than 22.2.
194+
mixedversion.MinimumBootstrapVersion("v22.2.0"),
196195
// Fixtures are generated on a version that's too old for this test.
197196
mixedversion.NeverUseFixtures,
198197
// Separate-process deployments can't run in 1-node clusters since
@@ -212,9 +211,8 @@ func runValidateSystemSchemaAfterVersionUpgradeSeparateProcess(
212211
ctx context.Context, t test.Test, c cluster.Cluster,
213212
) {
214213
validateSystemSchemaAfterUpgradeTest(ctx, t, c,
215-
// We limit the number of upgrades since the test is not expected to work
216-
// on versions older than 22.2.
217-
mixedversion.MaxUpgrades(3),
214+
// The test is not expected to work on versions older than 22.2.
215+
mixedversion.MinimumBootstrapVersion("v22.2.0"),
218216
// Fixtures are generated on a version that's too old for this test.
219217
mixedversion.NeverUseFixtures,
220218
mixedversion.EnabledDeploymentModes(mixedversion.SeparateProcessDeployment),

pkg/cmd/roachtest/tests/versionupgrade.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,12 @@ func runHTTPRestart(ctx context.Context, t test.Test, c cluster.Cluster) {
313313
mvt := mixedversion.NewTest(ctx, t, t.L(), c,
314314
c.CRDBNodes(),
315315
mixedversion.AlwaysUseLatestPredecessors,
316+
// We set the min bootstrap version to v24.2, as the fix for the
317+
// race condition was only backported to v24.2+ but exists as early
318+
// as v23.2. We use this over setting min supported version as this
319+
// test is concerned about testing cluster startup. We don't want the
320+
// framework to bootstrap the cluster before we can start running hooks.
321+
mixedversion.MinimumBootstrapVersion("v24.2.0"),
316322
)
317323

318324
// Any http request requiring auth will do.

0 commit comments

Comments
 (0)