Skip to content

Commit

Permalink
fix(nodeclaim): dedup logs marking consolidatable
Browse files Browse the repository at this point in the history
Signed-off-by: flavono123 <flavono123@gmail.com>
  • Loading branch information
flavono123 committed Feb 21, 2025
1 parent c0e7299 commit 501f898
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/controllers/nodeclaim/disruption/consolidation.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ func (c *Consolidation) Reconcile(ctx context.Context, nodePool *v1.NodePool, no
return reconcile.Result{RequeueAfter: consolidatableTime.Sub(c.clock.Now())}, nil
}

// 6. Otherwise, add the consolidatable status condition
// 3. Otherwise, add the consolidatable status condition if not already set
nodeClaim.StatusConditions().SetTrue(v1.ConditionTypeConsolidatable)
// We sleep here after a set operation since we want to ensure that we are able to read our own writes
// so that we avoid duplicating log lines due to quick re-queues from our node watcher
time.Sleep(100 * time.Millisecond)

Check failure on line 76 in pkg/controllers/nodeclaim/disruption/consolidation.go

View workflow job for this annotation

GitHub Actions / Analyze Go

undefined: time

Check failure on line 76 in pkg/controllers/nodeclaim/disruption/consolidation.go

View workflow job for this annotation

GitHub Actions / Analyze Go

undefined: time

Check failure on line 76 in pkg/controllers/nodeclaim/disruption/consolidation.go

View workflow job for this annotation

GitHub Actions / presubmit (1.25.x)

undefined: time

Check failure on line 76 in pkg/controllers/nodeclaim/disruption/consolidation.go

View workflow job for this annotation

GitHub Actions / presubmit (1.26.x)

undefined: time

Check failure on line 76 in pkg/controllers/nodeclaim/disruption/consolidation.go

View workflow job for this annotation

GitHub Actions / presubmit (1.27.x)

undefined: time

Check failure on line 76 in pkg/controllers/nodeclaim/disruption/consolidation.go

View workflow job for this annotation

GitHub Actions / presubmit (1.28.x)

undefined: time

Check failure on line 76 in pkg/controllers/nodeclaim/disruption/consolidation.go

View workflow job for this annotation

GitHub Actions / presubmit (1.29.x)

undefined: time

Check failure on line 76 in pkg/controllers/nodeclaim/disruption/consolidation.go

View workflow job for this annotation

GitHub Actions / presubmit (1.30.x)

undefined: time

Check failure on line 76 in pkg/controllers/nodeclaim/disruption/consolidation.go

View workflow job for this annotation

GitHub Actions / presubmit (1.31.x)

undefined: time

Check failure on line 76 in pkg/controllers/nodeclaim/disruption/consolidation.go

View workflow job for this annotation

GitHub Actions / presubmit (1.32.x)

undefined: time

if !hasConsolidatableCondition {
log.FromContext(ctx).V(1).Info("marking consolidatable")
}
Expand Down

0 comments on commit 501f898

Please sign in to comment.