-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CAPI: Stop panicking in newMachineController #2940
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the returned error path can actually be reached, other than that seems good
if CAPIGroup == "" { | ||
return nil, fmt.Errorf("could not get a CAPI group") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getCAPIGROUP
can't return an empty string, so this check is redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mm It does not hurt though, I guess it safe to assume it since getCAPIGROUP
is well unit tested. Dropped it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me, although i agree with Joel's comment
d2b08f9
to
dfbb049
Compare
/lgtm |
/area provider/cluster-api |
/lgtm |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: elmiko The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[CA-1.18] #2940 cherry-pick CAPI: Stop panicking in newMachineController
Stop panicking in newMachineController