Skip to content

Commit 8d77503

Browse files
craig[bot]DarrylWong
andcommitted
Merge #146115
146115: roachtest: fix tenant auto upgrade scheduling user hooks during setup r=herkolategan,srosenberg a=DarrylWong 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 Co-authored-by: DarrylWong <[email protected]>
2 parents 7bef357 + 2f79229 commit 8d77503

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)