Skip to content

Commit 1985d16

Browse files
committed
try to suppress lint
Signed-off-by: Ryan Zhang <yangzhangrice@hotmail.com>
1 parent d0853a5 commit 1985d16

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

pkg/scheduler/scheduler.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ func NewScheduler(
100100

101101
// ScheduleOnce performs scheduling for one single item pulled from the work queue.
102102
// it returns true if the context is not canceled, false otherwise.
103-
//
104-
//lint:ignore SA1019 we need more time to fully migrate to RequeueAfter as we used these two fields separately.
105103
func (s *Scheduler) scheduleOnce(ctx context.Context, worker int) {
106104
// Retrieve the next item (name of a placement) from the work queue.
107105
//
@@ -230,7 +228,7 @@ func (s *Scheduler) scheduleOnce(ctx context.Context, worker int) {
230228
}
231229

232230
// Requeue if the scheduling cycle suggests so.
233-
if res.Requeue {
231+
if res.Requeue { //nolint:golint //no lint SA1019 we need more time to fully migrate to RequeueAfter as we used these two fields separately.
234232
if res.RequeueAfter > 0 {
235233
s.queue.AddAfter(placementKey, res.RequeueAfter)
236234
observeSchedulingCycleMetrics(cycleStartTime, false, true)

pkg/utils/controller/controller.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ func (w *controller) processNextWorkItem(ctx context.Context) bool {
260260
return true
261261
}
262262

263-
//lint:ignore SA1019 we need more time to fully migrate to RequeueAfter as we used these two fields separately.
264263
func (w *controller) reconcileHandler(ctx context.Context, key interface{}) {
265264
// Update metrics after processing each item
266265
reconcileStartTS := time.Now()
@@ -285,7 +284,7 @@ func (w *controller) reconcileHandler(ctx context.Context, key interface{}) {
285284
w.queue.Forget(key)
286285
w.queue.AddAfter(key, result.RequeueAfter)
287286
metrics.FleetReconcileTotal.WithLabelValues(w.name, labelRequeueAfter).Inc()
288-
case result.Requeue:
287+
case result.Requeue: //nolint:golint // SA1019 we need more time to fully migrate to RequeueAfter as we used these two fields separately.
289288
w.queue.AddRateLimited(key)
290289
metrics.FleetReconcileTotal.WithLabelValues(w.name, labelRequeue).Inc()
291290
default:

0 commit comments

Comments
 (0)