Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-25.1: roachtest: fix missing binary for TPC-C in multitenant upgrade test #143184

Merged
merged 1 commit into from
Mar 26, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions pkg/cmd/roachtest/tests/multitenant_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,26 @@ func runMultitenantUpgrade(ctx context.Context, t test.Test, c cluster.Cluster)
// parallel. The returned channel is closed once the workload
// finishes running on every tenant.
runTPCC := func(
ctx context.Context, c cluster.Cluster, binaryPath string, h *mixedversion.Helper,
ctx context.Context, h *mixedversion.Helper, version *clusterupgrade.Version,
) chan struct{} {
return forEachTenant(
"run tpcc",
ctx,
h,
func(ctx context.Context, l *logger.Logger, tenant *tenantUpgradeStatus) error {
nodes := c.Node(tenant.nodes[0])
// We may attempt to runTPCC using a cockroach binary version
// that was never uploaded. See #142807.
binaryPath, err := clusterupgrade.UploadCockroach(ctx, t, l, c, nodes, version)
if err != nil {
return errors.Wrapf(err, "uploading cockroach %s", version)
}
cmd := fmt.Sprintf(
"%s workload run tpcc --warehouses %d --duration %s %s",
binaryPath, numWarehouses, tpccDuration, tenant.pgurl(),
)

return c.RunE(ctx, option.WithNodes(c.Node(tenant.nodes[0])), cmd)
return c.RunE(ctx, option.WithNodes(nodes), cmd)
},
)
}
Expand Down Expand Up @@ -239,9 +246,8 @@ func runMultitenantUpgrade(ctx context.Context, t test.Test, c cluster.Cluster)
}
}

binaryPath := clusterupgrade.BinaryPathForVersion(t, h.Context().FromVersion, "cockroach")
l.Printf("waiting for tpcc to run on tenants...")
<-runTPCC(ctx, c, binaryPath, h)
<-runTPCC(ctx, h, h.Context().FromVersion)
return nil
},
)
Expand All @@ -262,8 +268,7 @@ func runMultitenantUpgrade(ctx context.Context, t test.Test, c cluster.Cluster)
}
}

binaryPath := clusterupgrade.BinaryPathForVersion(t, h.Context().ToVersion, "cockroach")
tpccFinished := runTPCC(ctx, c, binaryPath, h)
tpccFinished := runTPCC(ctx, h, h.Context().ToVersion)

upgradeFinished := forEachTenant(
"finalize upgrade",
Expand Down