Skip to content

Commit

Permalink
Merge pull request #6305 from ninech/4c53c20-1.28
Browse files Browse the repository at this point in the history
Backport #6298 fix: handle error when listing machines into 1.28
  • Loading branch information
k8s-ci-robot committed Nov 21, 2023
2 parents 4695654 + f9bde40 commit 9b386d6
Showing 1 changed file with 4 additions and 1 deletion.
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 9b386d6

Please sign in to comment.