Skip to content

Commit 64af819

Browse files
committed
pkg/cvo/sync_worker: Promote "Sync succeeded" to v4
To match the existing v4 logs for: Running sync %s (force=%t) on generation %d in state %s at attempt %d To avoid excessive noise, also restrict it to edge transitions between states (the "Running sync ..." line exposes the level) and include the source state in the logged message. Because the * -> Reconciling transition is important, and deserves at least as much weight in the logs as "we're about to start a new sync cycle" and a log entry that comes before the next Until sleep.
1 parent e318b86 commit 64af819

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/cvo/sync_worker.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,9 @@ func (w *SyncWorker) Start(ctx context.Context, maxWorkers int) {
329329
utilruntime.HandleError(fmt.Errorf("unable to synchronize image (waiting %s): %v", interval, err))
330330
continue
331331
}
332-
klog.V(5).Infof("Sync succeeded, reconciling")
332+
if work.State != payload.ReconcilingPayload {
333+
klog.V(4).Infof("Sync succeeded, transitioning from %s to %s", work.State, payload.ReconcilingPayload)
334+
}
333335

334336
work.Completed++
335337
work.State = payload.ReconcilingPayload

0 commit comments

Comments
 (0)