Files
descheduler/pkg
Simone Tiraboschi a7ac072c7d evictions: fix assumePod silently dropping success metric on informer race
When KubeVirt sets EvictionInProgressAnnotationKey before returning
TooManyRequests, the informer's UpdateFunc can call addPod
(evictionAssumed=false) before evictPod's assumePod call arrives.
assumePod found the entry already present and returned early, leaving
evictionAssumed=false. DeleteFunc then skipped the "success" metric.

Fix: if the existing entry has evictionAssumed=false (added by addPod),
upgrade it in place without double-counting the pod in the counters.

Adds TestEvictionInBackgroundMetrics_InformerRace to reproduce the race
deterministically.

Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
2026-05-14 17:23:18 +02:00
..
2026-01-04 20:23:13 +01:00
2026-01-04 20:23:13 +01:00