Skip to content

e2e/networking: retry ingress request until xDS routes are ready - #724

Open
Aditya Shantanu (aditya-shantanu) wants to merge 1 commit into
agent-substrate:mainfrom
aditya-shantanu:fix/ingress-e2e-flake
Open

e2e/networking: retry ingress request until xDS routes are ready#724
Aditya Shantanu (aditya-shantanu) wants to merge 1 commit into
agent-substrate:mainfrom
aditya-shantanu:fix/ingress-e2e-flake

Conversation

@aditya-shantanu

Copy link
Copy Markdown
Collaborator

Summary

  • TestActorDirectAccess/via_ingress was intermittently failing with HTTP 503 / connection timeout because the test sent a single request immediately after ResumeActor returned, before the Envoy xDS update had propagated to the router.
  • Fixed by retrying the GET with a 30 s deadline (1 s intervals), matching the same pattern used by waitForActorStatus and callActor elsewhere in the e2e suite.
  • Also fixes the resource leak in the original code where defer response.Body.Close() was called before io.ReadAll, but the body was read correctly — the retry loop now closes each response body explicitly per iteration.

Fixes #723.

Test plan

  • e2e-test (cert) and e2e-test (token) pass — TestActorDirectAccess/via_ingress no longer fails on slow xDS propagation
  • On success the test logs "Actor access through ingress succeeded" as before
  • On repeated 503s the test logs each retry attempt and fails with a clear timeout message after 30 s

TestActorDirectAccess/via_ingress was flaky because the test probed the
ingress immediately after ResumeActor returned, before the Envoy xDS
update from the control plane had propagated — causing intermittent 503
connection timeouts.

Retry the GET with a 30 s deadline (1 s intervals), the same pattern
used by waitForActorStatus and callActor elsewhere in the e2e suite.

Fixes agent-substrate#723.
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.

E2E test flaky: TestActorDirectAccess/via_ingress

1 participant