Skip to content

Commit

Permalink
Merge #127896
Browse files Browse the repository at this point in the history
127896: roachtest: use spot VM for all tests r=shailendra-patel,vidit-bhat a=nameisbhaskar

Currently, we are using spot VMs only to run benchmark tests. The reason for the low adoption of spot VM is because of the test failures due to VM preemption.
But, with the recent changes, we have better control on VM preemption changes where if there is a test failure due to preemption, the test is run on an on-demand VM the next time.
Also, the current failed tests that are run on spot VM is 148 out of 1093 = 13.5%. If I consider failure out of total tests run is 148 out of 2508 = 5.9%.

So, this PR removes the condition to use spot VMs only for benchmark tests and changes the probability to 75%.

Fixes: #127236
Epic: None

Co-authored-by: Bhaskarjyoti Bora <[email protected]>
  • Loading branch information
craig[bot] and nameisbhaskar committed Aug 20, 2024
2 parents 3894961 + 69da7de commit b42ad64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/cmd/roachtest/test_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,11 @@ func (r *testRunner) Run(
}
// TODO(bhaskar): remove this once we have more usage details
// and more convinced about using spot VMs for all the runs.
if (roachtestflags.Cloud == spec.GCE || roachtestflags.Cloud == spec.AWS) &&
tests[i].Benchmark &&
if (roachtestflags.Cloud == spec.GCE || (roachtestflags.Cloud == spec.AWS &&
tests[i].Benchmark)) &&
!tests[i].Suites.Contains(registry.Weekly) &&
!tests[i].IsLastFailurePreempt() &&
rand.Float64() <= 0.8 {
rand.Float64() <= 0.75 {
lopt.l.PrintfCtx(ctx, "using spot VMs to run test %s", tests[i].Name)
tests[i].Cluster.UseSpotVMs = true
}
Expand Down

0 comments on commit b42ad64

Please sign in to comment.