Skip to content

Commit 2f79229

Browse files
committed
roachtest: fix tenant auto upgrade scheduling user hooks during setup
The mixed version planner splits up a plan into two partitions, setup steps and test steps. The latter will have user hooks scheduled while the former will omit them. The scheduling of user hooks is gated by the scheduleHooks boolean. However, there was one edge case which omitted this check and allowed for user hooks to be scheduled during version finalization of a tenant. Fixes: #145951 Release note: none
1 parent 7a8b18d commit 2f79229

File tree

1 file changed

+6
-4
lines changed
  • pkg/cmd/roachtest/roachtestutil/mixedversion

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -938,10 +938,12 @@ func (p *testPlanner) finalizeUpgradeSteps(
938938
// auto-upgrading after resetting a cluster setting, we need to
939939
// "manually" run the migrations at this point.
940940
if toVersion.AtLeast(tenantSupportsAutoUpgradeVersion) {
941-
steps = append(
942-
steps,
943-
p.concurrently(mixedVersionLabel, p.hooks.MixedVersionSteps(p.currentContext, p.prng))...,
944-
)
941+
if scheduleHooks {
942+
steps = append(
943+
steps,
944+
p.concurrently(mixedVersionLabel, p.hooks.MixedVersionSteps(p.currentContext, p.prng))...,
945+
)
946+
}
945947
} else {
946948
runStepsWithTenantMigrations()
947949
}

0 commit comments

Comments
 (0)