Skip to content
Open
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
4 changes: 2 additions & 2 deletions pkg/controllers/workapplier/backoff_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ var _ = Describe("exponential backoff", func() {
applyStrategy := &fleetv1beta1.ApplyStrategy{
WhenToTakeOver: fleetv1beta1.WhenToTakeOverTypeIfNoDiff,
}
createWorkObject(workName, memberReservedNSName2, applyStrategy, regularNSJSON)
createWorkObject(workName, memberReservedNSName2, applyStrategy, nil, regularNSJSON)
})

// For simplicity reasons, this test case will skip some of the regular apply op result verification
Expand Down Expand Up @@ -395,7 +395,7 @@ var _ = Describe("exponential backoff", func() {
WhenToTakeOver: fleetv1beta1.WhenToTakeOverTypeAlways,
WhenToApply: fleetv1beta1.WhenToApplyTypeAlways,
}
createWorkObject(workName, memberReservedNSName2, applyStrategy, regularNSJSON)
createWorkObject(workName, memberReservedNSName2, applyStrategy, nil, regularNSJSON)
})

// For simplicity reasons, this test case will skip some of the regular apply op result verification
Expand Down
3 changes: 3 additions & 0 deletions pkg/controllers/workapplier/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,9 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu
trackWorkAndManifestProcessingRequestMetrics(work)

// Requeue the Work object with a delay based on the requeue rate limiter.
//
// Note (chenyu1): at this moment the work applier does not register changes on back-reported
// status as a trigger for resetting the rate limiter.
requeueDelay := r.requeueRateLimiter.When(work, bundles)
klog.V(2).InfoS("Requeue the Work object for re-processing", "work", workRef, "delaySeconds", requeueDelay.Seconds())
return ctrl.Result{RequeueAfter: requeueDelay}, nil
Expand Down
Loading
Loading