Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.

Commit be7d5cc

Browse files
committed
Migrate to new controller-runtime wait
1 parent a62b295 commit be7d5cc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pkg/handler/recovery.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,8 @@ func (r *Recovery) Delete(w http.ResponseWriter, req *http.Request) {
112112
}
113113

114114
func (r *Recovery) pollUntilRecovered(ctx context.Context) (*galera.Bootstrap, error) {
115-
// TODO: bump apimachinery and migrate to PollUntilContextTimeout.
116-
// See: https://pkg.go.dev/k8s.io/[email protected]/pkg/util/wait#PollUntilContextTimeout
117115
var bootstrap *galera.Bootstrap
118-
err := wait.PollImmediateUntilWithContext(ctx, 1*time.Second, func(context.Context) (bool, error) {
116+
err := wait.PollUntilContextCancel(ctx, 1*time.Second, true, func(context.Context) (bool, error) {
119117
b, err := r.recover()
120118
if err != nil {
121119
r.logger.Error(err, "error recovering galera from recovery log")

0 commit comments

Comments
 (0)