Skip to content

e2e: fix the ingressauth flake: retry a refused handshake that ends without the router's alert - #2961

Merged
Taahir Ahmed (ahmedtd) merged 1 commit into
agent-substrate:mainfrom
dims:e2e-ingressauth-forward-retry
Oct 20, 2026
Merged

Taahir Ahmed (ahmedtd) merged 1 commit into
agent-substrate:mainfrom
dims:e2e-ingressauth-forward-retry

Conversation

@dims

Copy link
Copy Markdown
Collaborator

TestIngressAuthentication fails about one e2e job in three since static-mtls became the e2e default (5 of the 15 pr-workflow runs since #2390 merged): the refused client's request ends with http2: client conn could not be established instead of the router's TLS alert, and the test calls the refusal unproven. The router closes the connection right after the alert, and the port-forward (portforward.go:549 ... write: broken pipe) or Go's HTTP/2 client reports that close first.

Recent instances, all on the https listener:

Change. A refusal that fails without a TLS alert is retried on a fresh port-forward, three times at most. An alert is still required, and a client the router lets through still fails the test.

Tests. go vet and the suite compile; the retry only shows under the flake, which CI's e2e jobs exercise.

  • Tests pass
  • Appropriate changes to documentation are included in the PR (none needed)

… alert

TestIngressAuthentication proves a refusal by the router's TLS alert. The
router closes the connection right after sending it, and the port-forward
or Go's HTTP/2 client sometimes reports that close first, as "http2: client
conn could not be established", so the test failed with the refusal
unproven. A failure without an alert is now retried on a fresh
port-forward, three times at most; an alert is still required to pass.
@dims Davanum Srinivas (dims) changed the title e2e: retry a refused ingress handshake that ends without the router's alert e2e: fix the ingressauth flake: retry a refused handshake that ends without the router's alert Oct 20, 2026
@dims
Davanum Srinivas (dims) marked this pull request as ready for review October 20, 2026 13:28
@ahmedtd
Taahir Ahmed (ahmedtd) added this pull request to the merge queue Oct 20, 2026
Merged via the queue into agent-substrate:main with commit 71e12bc Oct 20, 2026
15 checks passed
@BenTheElder

Copy link
Copy Markdown
Collaborator

#3051 similar fix for TestActorArbitraryPortAccess

@BenTheElder Benjamin Elder (BenTheElder) added area/tests Enhancing / fixing test coverage. area/network labels Oct 21, 2026
Sneha-at (Sneha-at) pushed a commit to Sneha-at/substrate that referenced this pull request Oct 22, 2026
TestActorArbitraryPortAccess has been flaking in e2e since the router
moved to static-mtls in agent-substrate#2390, e.g.
https://github.com/agent-substrate/substrate/actions/runs/39549120410/job/119054007125

client-go closes the whole port-forward when any one connection on it
errors:

https://github.com/kubernetes/client-go/blob/v0.37.0/tools/portforward/portforward.go#L549-L550

RouterClient shared one CONNECT port-forward for the life of the client.
So one reset from the router failed the tunnel in flight and every
Connect after it, which then got "connection refused" from the dead
local port. agent-substrate#2961 fixed the same thing in ingressauth by forwarding per
attempt.


<!-- The PR title becomes the release note. Write it for users. -->

Why is this needed? (Or link the issue. Open one first for features,
API, install or CI changes.)

Fixes a trivial test flake bug, test only change. Spotted while
reviewing PRs like
agent-substrate#2502

<!-- e.g. "AI-assisted, I reviewed and tested it." No AI co-author
trailers. -->
AI use: AI-assisted, I reviewed it.

<!-- Breaking change? Describe what users must do on upgrade and ask for
the `breaking-change` label. -->

- [x] Tests pass
- [x] Docs updated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/network area/tests Enhancing / fixing test coverage.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants