diff --git a/cmd/ateapi/internal/controlapi/syncer.go b/cmd/ateapi/internal/controlapi/syncer.go index 5e1d58961..b584a7e92 100644 --- a/cmd/ateapi/internal/controlapi/syncer.go +++ b/cmd/ateapi/internal/controlapi/syncer.go @@ -101,7 +101,7 @@ func (s *WorkerPoolSyncer) Start(ctx context.Context) { // Reconcile the other direction: clean up stored workers whose pods no // longer exist. This recovers delete events missed while ate-api-server - // was down — neither the watch relist nor the resync period can replay a + // was down, neither the watch relist nor the resync period can replay a // delete across a process restart, because the informer cache starts empty. s.reconcileOrphanedWorkers(ctx) }() @@ -115,7 +115,7 @@ func (s *WorkerPoolSyncer) syncWorkerToStore(ctx context.Context, pod *corev1.Po if pod.DeletionTimestamp != nil { // The pod has entered Terminating: mark the worker DRAINING so the // scheduler stops routing new actors to it. We deliberately do NOT touch - // the bound actor here — inside the pod ateom has received SIGTERM and is + // the bound actor here, inside the pod ateom has received SIGTERM and is // gracefully shutting the actor down. Actor cleanup happens on the Pod // Deleted event. if err := s.markWorkerDraining(ctx, pod.Namespace, pod.Labels[workerPodLabel], pod.Name); err != nil { @@ -185,7 +185,6 @@ func (s *WorkerPoolSyncer) syncWorkerToStore(ctx context.Context, pod *corev1.Po w.Labels = pool.GetLabels() changed = true } - if changed { if err = s.persistence.UpdateWorker(ctx, w, w.Version); err != nil { slog.ErrorContext(ctx, "Failed to update worker in store", slog.Any("err", err)) @@ -200,7 +199,7 @@ func isWorkerEligible(pod *corev1.Pod) bool { // markWorkerDraining transitions a worker to STATE_DRAINING so the scheduler // stops routing new actors to it while its pod is Terminating. Best-effort: if // the worker is already gone or already draining, or a concurrent update wins, -// there is nothing more to do — the Pod Deleted event will clean up the record. +// there is nothing more to do, the Pod Deleted event will clean up the record. func (s *WorkerPoolSyncer) markWorkerDraining(ctx context.Context, namespace, pool, podName string) error { worker, err := s.persistence.GetWorker(ctx, namespace, pool, podName) if err != nil { diff --git a/cmd/ateapi/internal/controlapi/syncer_test.go b/cmd/ateapi/internal/controlapi/syncer_test.go index f2050ae4a..df621d512 100644 --- a/cmd/ateapi/internal/controlapi/syncer_test.go +++ b/cmd/ateapi/internal/controlapi/syncer_test.go @@ -369,7 +369,7 @@ func TestSyncer_OmittedFields(t *testing.T) { // TestSyncer_SoftDelete_MarksDraining verifies that a pod entering Terminating // (DeletionTimestamp set) flips its worker to STATE_DRAINING without deleting the -// worker record or touching the bound actor — the actor is still gracefully +// worker record or touching the bound actor, the actor is still gracefully // shutting down inside the pod. func TestSyncer_SoftDelete_MarksDraining(t *testing.T) { ctx := context.Background()