Skip to content

Commit

Permalink
Merge pull request #6303 from ninech/4c53c20-1.26
Browse files Browse the repository at this point in the history
Backport #6298 fix: handle error when listing machines into 1.26
  • Loading branch information
k8s-ci-robot authored Nov 21, 2023
2 parents 88a2bba + b773840 commit a40cd4b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,12 @@ func (ng *nodeGroup) listMachines() ([]unstructured.Unstructured, error) {
LabelSelector: fmt.Sprintf("%s=%s-%s", machineDeploymentNameLabelKey, ng.provider.config.ClusterName, ng.name),
},
)
if err != nil {
return nil, fmt.Errorf("could not list machines: %w", err)
}

ng.machines = machinesList.Items
return machinesList.Items, err
return machinesList.Items, nil
}

func (ng *nodeGroup) machineByName(name string) (*unstructured.Unstructured, error) {
Expand Down

0 comments on commit a40cd4b

Please sign in to comment.