Skip to content

test(e2e): register the UDP workloads as protocol "udp" and keep the #931 instruments - #938

Merged
bpalermo merged 1 commit into
mainfrom
feat/udp-e2e-first-class
Sep 26, 2026
Merged

bpalermo merged 1 commit into
mainfrom
feat/udp-e2e-first-class

Conversation

@bpalermo

Copy link
Copy Markdown
Owner

Last of the #931 series, and the one that proves it. The l4-routes UDPRoute leg was red for three runs — two nightlies plus a local kind reproduction. It is green now.

The change that matters is one annotation

deploy_l4echo_workload derives the registry protocol from the listener mode instead of hardcoding "tcp":

local protocol="tcp"
[ "$mode" = "udp" ] && protocol="udp"

Derived rather than a sixth parameter, because every --mode=udp workload must register "udp" and every other mode must not — deriving makes the two impossible to get out of step.

The comment block explaining the old workaround is rewritten. It had described, accurately for its time, that the UDP workloads register "tcp" because "udp" was not accepted and the TCP classification supplied what the UDP path needed. That explanation was load-bearing evidence for #931 — it wrote the lie down without noticing it was a bug.

Result, local kind run

✓ 10/10 datagrams unanswered: the UDP listener does not exist until a UDPRoute does
✓ 40/40 datagrams answered by l4udp-a, 0 by the weight-0 backend
✓ 10/10 datagrams unanswered again: the route, not the fixture, was carrying them

15 of 15 assertions green — TCPRoute 6, TLSRoute 6, UDPRoute 3.

And the fix is visible in the live Envoy config, which is the cleanest before/after available:

before after
health_l4udp-a-… target 127.0.0.1:9001 127.0.0.1:18008
status failed_active_health_check: true HEALTHY

The instruments stay

Folded in the diagnostics that located the root cause, so nobody has to rebuild them:

The receipt log is verified in the green case too — 5 rx lines this run — not only in the failure it was written for.

Series

#933 e78cb03 protocol vocabulary
#934 4f56777 control-plane fan-out
#935 63deab3 agent xDS udp: entries
#936 92430b4 the fix
#937 f66a438 the detector
this the proof

Closes #931 once merged. The l4-routes half of #927 goes with it; the replicator half was a flake that passed unchanged.

Still open and deliberately untouched: per-service UDP selection (#916 / proposal 038 Phase 2, gated on a node spike), weighted UDP splits (#873), and #932 (UDPLoadAssignment's clone carries waypoint metadata).

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

…931 instruments

Last of the #931 series, and the one that proves it. The l4-routes UDPRoute leg
was red for three runs (two nightlies plus a local kind reproduction); it is
green now.

THE CHANGE THAT MATTERS IS ONE ANNOTATION

deploy_l4echo_workload derives the registry protocol from the listener mode
instead of hardcoding "tcp":

	local protocol="tcp"
	[ "$mode" = "udp" ] && protocol="udp"

Derived rather than a sixth parameter, because every --mode=udp workload must
register "udp" and every other mode must not; deriving makes the two impossible
to get out of step.

The comment block that explained the old workaround is rewritten. It had
described, accurately for its time, that the UDP workloads register "tcp"
because "udp" was not an accepted value and the TCP classification supplied what
the UDP path needed. That explanation was load-bearing evidence for #931: it
wrote the lie down without noticing it was a bug.

RESULT, LOCAL KIND RUN

  ✓ 10/10 datagrams unanswered: the UDP listener does not exist until a
    UDPRoute does
  ✓ 40/40 datagrams answered by l4udp-a, 0 by the weight-0 backend
  ✓ 10/10 datagrams unanswered again: the route, not the fixture, was
    carrying them

15 of 15 assertions green (TCPRoute 6, TLSRoute 6, UDPRoute 3).

And the fix is visible in the live Envoy config:

  before:  health_l4udp-a-...  127.0.0.1:9001   failed_active_health_check: true
  after:   health_l4udp-a-...  127.0.0.1:18008  HEALTHY

THE INSTRUMENTS STAY

Folded in the diagnostics that located the root cause, so nobody has to rebuild
them:

  - l4echo --mode=udp logs every receipt. Without it "the datagram never
    arrived" and "it arrived and the reply was lost" both read as NOREPLY at the
    client, and they are different bugs in different layers. Its SILENCE is what
    pointed at the upstream hop while the CNI redirect and Envoy's socket were
    both demonstrably fine.
  - dump_state surfaces those receipts, and greps for #931's new "no routable
    endpoint" warning.
  - the etcd key dump widens from `grep -i tcp` to PROTOCOL_(TCP|UDP): a UDP
    workload registered under the TCP key is exactly the #931 misconfiguration,
    and this dump is one of the few places it shows.

The receipt log is verified in the GREEN case too (5 rx lines this run), not only
in the failure it was written for.

Refs #931

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
@bpalermo
bpalermo merged commit 9f0907e into main Sep 26, 2026
23 checks passed
@bpalermo
bpalermo deleted the feat/udp-e2e-first-class branch September 26, 2026 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant