Skip to content

test(e2e): multi-protocol per service end-to-end check on a real cluster - #901

Merged
bpalermo merged 1 commit into
mainfrom
test/037-multiprotocol-e2e
Sep 22, 2026
Merged

bpalermo merged 1 commit into
mainfrom
test/037-multiprotocol-e2e

Conversation

@bpalermo

Copy link
Copy Markdown
Owner

Deploys one workload serving an HTTP primary on :8080 and a raw-TCP secondary on :9000 — the shape proposal 037 exists to enable, and the one no existing suite covers — then drives it from a mesh client and asserts both protocols reach the right port.

Why a Job, not kubectl exec

exec into talos-main isn't available to this harness. That turns out to be the better test anyway: the client pod is captured, so its dials traverse the capture listener exactly as an application's would, rather than bypassing it from outside.

It is its own negative control

Run against rev233 — Release B without design (d) — it produced exactly the expected split:

RESULT http_18081    PASS
RESULT http_portless PASS
RESULT tcp_9000      FAIL got=[]

That's the gap design (d) closes, reproduced on the cluster rather than argued: an HTTP-primary service's raw-TCP port had no capture chain at all, while HTTP to the same VIP was untouched.

So this script was seen red against the code lacking the fix, and its two HTTP checks confirm the fix doesn't disturb the common path. Re-running it after deploying design (d) is the end-to-end proof for the whole proposal.

Checks

check spelling
http_18081 the explicit HTTP spelling
http_portless http:// with no port — the scheme's default (80)
tcp_9000 raw TCP to the service's own port

Plus an assertion that the pod actually carries ports: "8080,9000=tcp", so a silently-dropped annotation can't make the TCP check vacuously skip.

Workloads satisfy restricted PSA and are cleaned up on exit (--keep to inspect).

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

Deploys ONE workload serving an HTTP primary on :8080 and a raw-TCP secondary
on :9000 — the shape proposal 037 exists to enable, and the one no existing
suite covers — then drives it from a mesh client and asserts both protocols
reach the right port.

It runs as an in-mesh Job rather than via `kubectl exec`, which is not
available to this harness. That is also the more faithful test: the client pod
is captured, so its dials traverse the capture listener exactly as an
application's would, rather than bypassing it from outside.

Three checks, each a distinct spelling from the client contract:

  http_18081     the explicit HTTP spelling
  http_portless  http:// with no port — the scheme's default (80)
  tcp_9000       raw TCP to the service's OWN port

Run against rev233 — Release B WITHOUT design (d) — it produced exactly the
expected split:

  RESULT http_18081    PASS
  RESULT http_portless PASS
  RESULT tcp_9000      FAIL got=[]

which is the gap design (d) closes, reproduced on the cluster rather than
argued: an HTTP-primary service's raw-TCP port had no capture chain at all,
while HTTP to the same VIP was untouched. That makes this script its own
negative control — it was seen red against the code that lacks the fix, and
its HTTP checks confirm the fix does not disturb the common path.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
@bpalermo
bpalermo merged commit b087cd1 into main Sep 22, 2026
22 checks passed
@bpalermo
bpalermo deleted the test/037-multiprotocol-e2e branch September 22, 2026 15:44
bpalermo added a commit that referenced this pull request Sep 23, 2026
…910)

`make format-check` was red on main. `e2e/multiprotocol.sh` landed in #901
with two-space indentation against shfmt's tabs, CI green, and sat
unformatted.

The cause is that NO job ran the formatter. ci.yaml had twelve jobs and none
of them invoked //:format.check; the only reference to it anywhere in the
repo was the Makefile target. So the repo had formatters configured
(gofumpt, buildifier, shfmt, buf in bazel/format/BUILD.bazel), a documented
`make format-check` in CLAUDE.md, and nothing that made either matter.

This is the #853 family again: a check that exists, is documented, and never
runs. Its greenness carried no information because it was never capable of
turning red.

What made it easy to miss is worth recording: the `shell` job DID shellcheck
that exact file, and passed. Lint coverage was real; format coverage was
absent. A green shell job is not evidence a file was formatted.

The new job asserts the SET OF LANGUAGES the formatter ran, not just its exit
code. //:format.check prints one "Formatted <language>" line per configured
language and exits 0 regardless of how much it inspected, so a language
dropped from bazel/format/BUILD.bazel would otherwise leave the job green
while checking less than it claims. That is the same tripwire the shell job
uses for its empty query.

Both arms demonstrated red before being trusted:

  formatting violation  -> ::error::formatting violations — run 'make format'
  language dropped      -> ::error::the formatter never ran for: Shell

and green once restored.

Closes #906


Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

Co-authored-by: Bruno Palermo <[email protected]>
Co-authored-by: Claude Opus 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant