Skip to content

Commit 74b821a

Browse files
authored
refactor: return potential error instead of discarding it (#93)
1 parent 9098de3 commit 74b821a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

controllers/machinepools.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ func scaleMachinePool(aw *arbv1.AppWrapper, userRequestedInstanceType string, re
4040
m[aw.Name] = aw.Name
4141

4242
machinePoolID := strings.ReplaceAll(aw.Name+"-"+userRequestedInstanceType, ".", "-")
43-
createMachinePool, _ := cmv1.NewMachinePool().ID(machinePoolID).InstanceType(userRequestedInstanceType).Replicas(replicas).Labels(m).Build()
43+
createMachinePool, err := cmv1.NewMachinePool().ID(machinePoolID).InstanceType(userRequestedInstanceType).Replicas(replicas).Labels(m).Build()
44+
if err != nil {
45+
klog.Infof("Error creating machinepool %v", err)
46+
}
4447

4548
klog.Infof("Create machinepool with instance type %v and name %v", userRequestedInstanceType, createMachinePool.ID())
4649
clusterMachinePools.Add().Body(createMachinePool).SendContext(context.Background())

0 commit comments

Comments
 (0)