Repository navigation
fix(e2e): retry failed DNS lookups for BackendTLS public-host routes - #10241
Conversation
The "with a backend TLS Policy using Truststore" and "With Backend.TLS.AutoSNIFromEndpointHostname" subtests route to the public host gateway.envoyproxy.io through Backend FQDN clusters. Envoy resolves the name as soon as the test applies its manifests. If that first lookup fails (a resolver that takes about 2s is enough: c-ares and CoreDNS give up by then), the default DNS settings keep the route broken for the whole 30s test window: - a failed lookup is only retried after the 30s refresh rate, so the route returns "no healthy upstream"; - or V4_PREFERRED falls back to the AAAA records, and the IPv4-only runner gets "remote connection failure" until their TTL expires. Attach a BackendTrafficPolicy to the two routes that resolves IPv4 only and sets a 1s refresh rate. With no failure refresh rate set, Envoy retries a failed lookup after 1s, while successful lookups still refresh on the record's TTL. The policy is declared before the routes so their clusters are created with these settings. Signed-off-by: Abdulaziz Alharbi <246710009+abdulaziz-dev-lab@users.noreply.github.com>
✅ Deploy Preview for cerulean-figolla-1f9435 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10241 +/- ##
==========================================
- Coverage 81.55% 81.55% -0.01%
==========================================
Files 266 266
Lines 41568 41568
==========================================
- Hits 33901 33899 -2
- Misses 7666 7668 +2
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/retest |
1 similar comment
|
/retest |
What this PR does / why we need it:
TestE2E/BackendTLS/with_a_backend_TLS_Policy_using_Truststorefails when Envoy's first DNS lookup of the public hostgateway.envoyproxy.iofails (#10240). With EG's default DNS settings, the cluster then either retries only after the 30 s refresh rate, or falls back from IPv4 to IPv6 addresses the runners can't reach. Either outlasts the 30 s test window.This adds a test-only
BackendTrafficPolicytotest/e2e/testdata/backend-tls.yamlfor the two routes that reach that host:lookupFamily: IPv4gives the two clustersV4_ONLY, so there is no IPv6 fallback.dnsRefreshRate: after 1 s instead of 30 s.respectDnsTtlstays on, so successful lookups still refresh on the record's TTL.Product code and the other BackendTLS subtests are unchanged. These two subtests no longer use the default DNS settings, which they don't test.
Tested locally on kind with a DNS fault proxy for
envoyproxy.iobehind CoreDNS, runningmake run-e2e E2E_RUN_TEST=BackendTLS:no healthy upstream)remote connection failure)Which issue(s) this PR fixes:
Fixes #10240
PR Checklist
git commit -s). See DCO: Sign your work./api), the API was discussed and agreed before the implementation. The API change can be in a separate PR, or in the same PR, but the API must be agreed before implementation. N/A if this PR does not contain API changes. N/A: no changes under/api.make generate gen-check,make lint, and the unit-test/coverage build pass. (Flaky e2e failures are not considered breakages, butgen-check,lint, and coverage MUST pass.)release-notes/current/<section>/<pr-number>-<slug>.md(seerelease-notes/current/README.mdfor sections and naming). N/A if this PR does not contain non-trivial changes. N/A: test-only change.make gen-checkand committed the result if API/helm charts/modules changed. N/A: nothing generated changed.release-notes/current/breaking_changes/.