Skip to content
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

[release-1.9] 🌱 Drop retry when computing KCP conditions #11522

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions controlplane/kubeadm/internal/workload_cluster_conditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,11 @@ func (w *Workload) UpdateEtcdConditions(ctx context.Context, controlPlane *Contr
if controlPlane.IsEtcdManaged() {
// Update etcd conditions.
// In case of well known temporary errors + control plane scaling up/down or rolling out, retry a few times.
// Note: this is required because there isn't a watch mechanism on etcd.
maxRetry := 3
// Note: it seems that reducing the number of them during every reconciles also improves stability,
// thus we are stopping doing retries (we only try once).
// However, we keep the code implementing retry support so we can easily revert this decision in a patch
// release if we need to.
maxRetry := 1
for i := range maxRetry {
retryableError := w.updateManagedEtcdConditions(ctx, controlPlane)
// if we should retry and there is a retry left, wait a bit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,9 @@ func TestUpdateEtcdConditions(t *testing.T) {
callCount = 0
w.UpdateEtcdConditions(ctx, controlPane)
if tt.expectedRetry {
g.Expect(callCount).To(Equal(3))
} else {
// Note we keep the code implementing retry support so we can easily re-activate it if we need to.
// g.Expect(callCount).To(Equal(3))
// } else {
g.Expect(callCount).To(Equal(1))
}
})
Expand Down
Loading