Change:
This test has started failing on our e2e test suite, erroring out with "Failed to get endpoints..." https://k8s- https://k8s- Example failures https://k8s- https://k8s- cc cc
This may be related to our recently-merged endpoints change in . I'll look into it.
I verified that the flakiness introduced was a result of . A fix in should be merging soon. /assign
GitHub didn't allow me to assign the following users: joelsmith. Note that only can be assigned. <detailsIn response to : I verified that the flakiness introduced was a result of . A fix in should be merging soon. /assign Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details

Discussion:
}} } <del> func podAddressChanged(oldPod, newPod *v1.Pod) bool { </del> <ins> func podChanged(oldPod, newPod *v1.Pod) bool { // If the pod's readiness has changed, the associated endpoint address // will move from the unready endpoints set to the ready endpoints. // So for the purposes of an endpoint, a readiness change on a pod // means we have a changed pod. if podutil.IsPodReady(oldPod) != podutil.IsPodReady(newPod) { return true } </ins> // Convert the pod to an EndpointAddress, clear inert fields, // and see if they are the same. newEndpointAddress := podToEndpointAddress(newPod)

return } <del> podChanged := podAddressChanged(oldPod, newPod) </del> <ins> podChangedFlag := podChanged(oldPod, newPod) </ins> // Check if the pod labels have changed, indicating a possibe // change in the service membership

} // If both the pod and labels are unchanged, no update is needed <del> if !podChanged && !labelsChanged { </del> <ins> if !podChangedFlag && !labelsChanged { </ins> return }

utilruntime.HandleError(fmt.Errorf("Unable to get pod %v/%v's service memberships: %v", oldPod.Namespace, oldPod.Name, err)) return } <del> services = determineNeededServiceUpdates(oldServices, services, podChanged) </del> <ins> services = determineNeededServiceUpdates(oldServices, services, podChangedFlag) </ins> } for key := range services {

} } <del> func TestPodAddressChanged(t *testing.T) { </del> <ins> func TestPodChanged(t *testing.T) { </ins> podStore := cache.NewStore(cache.DeletionHandlingMetaNamespaceKeyFunc) ns := "test" addPods(podStore, ns, 1, 1, 0)

oldPod := pods[0].(*v1.Pod) newPod := oldPod.DeepCopy() <del> if podAddressChanged(oldPod, newPod) { t.Errorf("Expected address to be unchanged for copied pod") </del> <ins> if podChanged(oldPod, newPod) { t.Errorf("Expected pod to be unchanged for copied pod") </ins> } newPod.Spec.NodeName = "changed" <del> if !podAddressChanged(oldPod, newPod) { t.Errorf("Expected address to be changed for pod with NodeName changed") </del> <ins> if !podChanged(oldPod, newPod) { t.Errorf("Expected pod to be changed for pod with NodeName changed") </ins> } newPod.Spec.NodeName = oldPod.Spec.NodeName newPod.ObjectMeta.ResourceVersion = "changed" <del> if podAddressChanged(oldPod, newPod) { t.Errorf("Expected address to be unchanged for pod with only ResourceVersion changed") </del> <ins> if podChanged(oldPod, newPod) { t.Errorf("Expected pod to be unchanged for pod with only ResourceVersion changed") </ins> } newPod.ObjectMeta.ResourceVersion = oldPod.ObjectMeta.ResourceVersion newPod.Status.PodIP = "1.2.3.1" <del> if !podAddressChanged(oldPod, newPod) { t.Errorf("Expected address to be changed with pod IP address change") </del> <ins> if !podChanged(oldPod, newPod) { t.Errorf("Expected pod to be changed with pod IP address change") </ins> } newPod.Status.PodIP = oldPod.Status.PodIP newPod.ObjectMeta.Name = "wrong-name" <del> if !podAddressChanged(oldPod, newPod) { t.Errorf("Expected address to be changed with pod name change") </del> <ins> if !podChanged(oldPod, newPod) { t.Errorf("Expected pod to be changed with pod name change") </ins> } newPod.ObjectMeta.Name = oldPod.ObjectMeta.Name <ins> saveConditions := oldPod.Status.Conditions oldPod.Status.Conditions = nil if !podChanged(oldPod, newPod) { t.Errorf("Expected pod to be changed with pod readiness change") } oldPod.Status.Conditions = saveConditions </ins> } func TestDetermineNeededServiceUpdates(t *testing.T) {