Skip to content

Commit ce71303

Browse files
author
Renato Costa
committed
roachtest: fix fetching of versions in mixedversion
When the concurrent fetching of binary/cluster versions was added, it embarrassingly missed a `Wait` call to make sure we had all the necessary versions before updating the corresponding version array. Epic: none Release note: None
1 parent c64fb80 commit ce71303

File tree

1 file changed

+9
-1
lines changed
  • pkg/cmd/roachtest/roachtestutil/mixedversion

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,10 @@ func (tr *testRunner) refreshBinaryVersions(ctx context.Context, service *servic
552552
})
553553
}
554554

555+
if err := group.Wait(); err != nil {
556+
return err
557+
}
558+
555559
service.binaryVersions.Store(newBinaryVersions)
556560
return nil
557561
}
@@ -569,14 +573,18 @@ func (tr *testRunner) refreshClusterVersions(ctx context.Context, service *servi
569573
group.GoCtx(func(ctx context.Context) error {
570574
cv, err := clusterupgrade.ClusterVersion(ctx, tr.conn(node, service.descriptor.Name))
571575
if err != nil {
572-
return err
576+
return fmt.Errorf("failed to get cluster version for node %d: %w", node, err)
573577
}
574578

575579
newClusterVersions[j] = cv
576580
return nil
577581
})
578582
}
579583

584+
if err := group.Wait(); err != nil {
585+
return err
586+
}
587+
580588
service.clusterVersions.Store(newClusterVersions)
581589
return nil
582590
}

0 commit comments

Comments
 (0)