Skip to content

Commit bda6584

Browse files
craig[bot]herkolategan
andcommitted
Merge #149979
149979: roachprod: fix ServiceDescriptor error handling r=golgeek,DarrylWong a=herkolategan Previously, this could cause a panic if an error occurred while fetching the service descriptors. Now when an error returns it will return an empty `ServiceDesc` Epic: None Release note: None Co-authored-by: Herko Lategan <[email protected]>
2 parents 0101d8c + b918938 commit bda6584

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/roachprod/install/cockroach.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,9 @@ func (c *SyncedCluster) ServiceDescriptor(
519519
sqlInstance int,
520520
) (ServiceDesc, error) {
521521
services, err := c.ServiceDescriptors(ctx, Nodes{node}, virtualClusterName, serviceType, sqlInstance)
522+
if err != nil {
523+
return ServiceDesc{}, err
524+
}
522525
return services[0], err
523526
}
524527

0 commit comments

Comments
 (0)