From 3b97bea297011a404bb89ee61d26fd25f62c0144 Mon Sep 17 00:00:00 2001 From: Arvind Thirumurugan Date: Tue, 22 Oct 2024 13:26:40 -0700 Subject: [PATCH] fix retry logic --- pkg/scheduler/framework/framework.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/scheduler/framework/framework.go b/pkg/scheduler/framework/framework.go index 4f959cefe..252da0b22 100644 --- a/pkg/scheduler/framework/framework.go +++ b/pkg/scheduler/framework/framework.go @@ -406,7 +406,10 @@ func (f *framework) removeFinalizer(ctx context.Context, bindings []*placementv1 // We will retry on conflicts. if apierrors.IsConflict(err) { // get the binding again to make sure we have the latest version to update again. - return f.client.Get(cctx, client.ObjectKeyFromObject(deletingBinding), deletingBinding) + getErr := f.client.Get(cctx, client.ObjectKeyFromObject(deletingBinding), deletingBinding) + if getErr != nil { + return getErr + } } return err })