Skip to content

Commit 05be6dc

Browse files
committed
fix requeue and format
Signed-off-by: Britania Rodriguez Reyes <britaniar@microsoft.com>
1 parent 8d24ebd commit 05be6dc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/controllers/workapplier/controller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ func (r *Reconciler) garbageCollectAppliedWork(ctx context.Context, work *fleetv
488488
return r.removeWorkFinalizer(ctx, work)
489489
}
490490
klog.ErrorS(err, "Failed to get AppliedWork", "appliedWork", work.Name)
491-
return ctrl.Result{}, controller.NewAPIServerError(false, err)
491+
return ctrl.Result{Requeue: true}, controller.NewAPIServerError(false, err)
492492
}
493493

494494
// Delete the appliedWork object.
@@ -505,11 +505,11 @@ func (r *Reconciler) garbageCollectAppliedWork(ctx context.Context, work *fleetv
505505
return r.removeWorkFinalizer(ctx, work)
506506
}
507507
klog.V(2).ErrorS(err, "Failed to delete the appliedWork", "appliedWork", work.Name)
508-
return ctrl.Result{Requeue: true}, controller.NewAPIServerError(false, err)
508+
return ctrl.Result{}, controller.NewAPIServerError(false, err)
509509
}
510510
}
511511
klog.V(2).InfoS("AppliedWork deletion in progress", "appliedWork", work.Name)
512-
return ctrl.Result{Requeue: true}, fmt.Errorf("AppliedWork %s is being deleted, waiting for the deletion to complete", work.Name)
512+
return ctrl.Result{}, fmt.Errorf("AppliedWork %s is being deleted, waiting for the deletion to complete", work.Name)
513513
}
514514

515515
// updateOwnerReference updates the AppliedWork owner reference in the manifest objects.

pkg/controllers/workapplier/controller_integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
66
You may obtain a copy of the License at
77
8-
http://www.apache.org/licenses/LICENSE-2.0
8+
http://www.apache.org/licenses/LICENSE-2.0
99
1010
Unless required by applicable law or agreed to in writing, software
1111
distributed under the License is distributed on an "AS IS" BASIS,

0 commit comments

Comments
 (0)