🌱 KCP should handle missing control plane label#13466
🌱 KCP should handle missing control plane label#13466k8s-ci-robot merged 3 commits intokubernetes-sigs:mainfrom
Conversation
|
/test pull-cluster-api-e2e-conformance-ci-latest-main |
d3303bc to
dd3dbb2
Compare
|
/test pull-cluster-api-e2e-main-gke |
|
/test pull-cluster-api-e2e-conformance-ci-latest-main |
|
|
||
| // If it failed to get members, consider the check failed in case there is at least a machine already provisioned. | ||
| if members == nil { | ||
| if controlPlane.EtcdMembers == nil { |
There was a problem hiding this comment.
nit. Let's check for len instead of nil?
There was a problem hiding this comment.
I think it is not equivalent, because empty list is a valid case during startup
There was a problem hiding this comment.
Let's add a godoc that we are explicitly making a difference between nil and empty here. That's tricky to spot otherwise (side note: this is the only place where we are checking for nil, I'm wondering if we incorrectly check for len in other places)
There was a problem hiding this comment.
Okay there is a godoc above + I checked all len checks. Seems fine.
Would be maybe still good to make this more explicit instead of relying on this being nil. But it's not a regression in this PR so I don't want to block the PR.
|
/test pull-cluster-api-e2e-main-gke |
|
Nice work, thx! /lgtm |
|
LGTM label has been added. DetailsGit tree hash: 357a07833d9dc90978763f04bf047cb9ba61eca7 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
With this PR tolerates missing control plane label and also surfaces etcd members stuck in learner mode
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Somewhat related to #13221