kube-proxy does not look at Endpoints ever, so it is incorrect for a
test to assume that there is any correlation between whether Endpoints
exist and whether a Service is working. Tests should only be using the
v1.Endpoints API if they are explicitly testing the behavior of
v1.Endpoints, the Endpoints controller, or the EndpointSlice mirroring
controller. There is no reason for any non SIG Network tests to be
testing any of those things, so there should be no references to
v1.Endpoints in test/e2e outside of test/e2e/network.
Also, simplify some pointlessly complicated e2eservice code.
This was previously used by some autoscaling tests that have since
been removed. It is somewhat sketchy (and inherently [Disruptive]),
and depends on iptables (so would need to be updated to use nftables
at some point if we were keeping it). Given that it's now unused, just
remove it (as well as some helper functions that are no longer used by
anyone else as well).
cache.ErrRequeue advertised itself as a way to requeue failures on a
FIFO, but it suffers the same problems as AddIfNotPresent. If we do
requeue an item at the end, we'll move the informer back in time. If we
requeue at the beginning we'll simply wedge FIFO.
We didn't find examples in the wild, but by removing the error type
those impacted will get a compile error and get to decide what action is
most appropriate for their failure. Most of the time, proceeding to the
next item is best.
Logically a cache.Queue.AddIfNotPresent means that the informer can move
back in time since an older item is placed after newer items. The
alternative of placing errors at the head of the queue leads to
indefinite memory growth and repeated failures on retry.
Luckily this behavior was behind RetryOnError, which was always set to
false and impossible for normal users to set to true. By removing the
function and setting, impacted users (none found in a github search)
will get a compile failure.
All of the shell commands used by `make test-cmd` log success and
failures to stdout, e.g.:
get.sh -> if_has_string ->
2c9153576e/hack/lib/test.sh (L340-L360)
juLog captured stdout in addition to forwarding it to the overall test stdout,
but then only used it to check for text that indicates a problem. The result
was that after a test failure, the only thing visible in Spyglass was a fairly
useless "script error" generated by juLog for its own call chain. One had to
know that the entire build log contained more information and where to look for
it.
Now the stdout text is included in the JUnit file and thus visible when looking
at just one failed test. The output itself is still hard to read (contains one
line saying "FAIL!" and one has to know that the text below that line explains
the failure), but that is a different story.