Detect listener pod drift by comparing the pod, not a hash (#4635)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Nikola Jokic
2026-09-10 22:56:43 +02:00
committed by GitHub
co-authored by Copilot App
parent c475023e28
commit 0cfedfbb2c
6 changed files with 478 additions and 47 deletions
@@ -0,0 +1,19 @@
package actionsgithubcom
import (
"testing"
)
// BenchmarkListenerPodSpecRequiresRecreation measures the listener pod drift
// check, which also runs on every AutoscalingListener reconcile.
func BenchmarkListenerPodSpecRequiresRecreation(b *testing.B) {
desired := desiredListenerPod()
live := livePodFromDesired(desired)
b.ReportAllocs()
b.ResetTimer()
for range b.N {
if listenerPodSpecRequiresRecreation(live, desired) {
b.Fatal("expected no recreation")
}
}
}