Skip to content

fix(translator): drop backendRefs without ready endpoints when other backends are available - #10180

Open
kkk777-7 wants to merge 2 commits into
envoyproxy:mainfrom
kkk777-7:skip-no-endpoints-backendrefs
Open

kkk777-7 wants to merge 2 commits into
envoyproxy:mainfrom
kkk777-7:skip-no-endpoints-backendrefs

Conversation

@kkk777-7

@kkk777-7 kkk777-7 commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

What this PR does / why we need it:

When an HTTPRoute/GRPCRoute rule has multiple backendRefs and some of them have no ready endpoints, their share of traffic is currently sent to invalid-backend-cluster and returns 503, even though healthy backends exist in the same rule.

This PR drops backendRefs without ready endpoints from the rule's destination when at least one other backendRef is available, so the remaining backends receive all the traffic per their relative weights.

  • The BackendsAvailable=False (EndpointsNotFound) condition is still reported.
  • The 503 direct response is kept when all backendRefs in the rule have no ready endpoints.
Rule backendRefs Before After
All have no endpoints gatewayapi: 503 direct response Unchanged
Valid + no endpoints xds: no-endpoints share routed to invalid-backend-cluster (503), rule split into per-backend weighted clusters No-endpoints backendRefs dropped; 100% to valid backends, rule stays a single cluster
Valid + invalid + no endpoints xds: invalid + no-endpoints share routed to invalid-backend-cluster (503) No-endpoints backendRefs dropped; invalid share returns 500, as the spec requires
Valid + invalid xds: invalid share routed to invalid-backend-cluster (500) Unchanged

Also, GRPCRoute now marks destinations with processing errors as invalid, as HTTPRoute already does.

Which issue(s) this PR fixes:

Fixes #8031


PR Checklist

  • Authorship & ownership: Coding agents / AI assistants are welcome, but I have reviewed every change, understand how and why it works, can explain and maintain it, and take full responsibility for this PR. I have not submitted generated output I do not understand.
  • DCO: All commits are signed off (git commit -s). See DCO: Sign your work.
  • API agreed first: If this PR contains API changes (changes under /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.
  • Required checks pass: make generate gen-check, make lint, and the unit-test/coverage build pass. (Flaky e2e failures are not considered breakages, but gen-check, lint, and coverage MUST pass.)
  • Tests added/updated: New/changed code is covered by appropriate tests. N/A if this PR does not contain code changes.
  • Docs: User-facing changes update the docs, either in this PR or a follow-up PR. N/A if this PR does not contain user-facing changes.
  • Release notes: For any non-trivial change, added a release-note fragment under release-notes/current/<section>/<pr-number>-<slug>.md (see release-notes/current/README.md for sections and naming). N/A if this PR does not contain non-trivial changes.
  • Generated files committed: Ran make gen-check and committed the result if API/helm charts/modules changed.
  • Scope & compatibility: The PR is reasonably scoped (no unrelated changes) and preserves backward compatibility, or any breaking change is called out above and documented in release-notes/current/breaking_changes/.
  • Codex review: Requested a Codex review and addressed all of its comments.
  • Copilot review: Requested a Copilot review and addressed all of its comments.

…backends are available

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
@netlify

netlify Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit df32bd7
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6ac2137093bad20008910d79
😎 Deploy Preview https://deploy-preview-10180--cerulean-figolla-1f9435.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
@kkk777-7 kkk777-7 added this to the v1.10.0-rc.1 Release milestone Oct 4, 2026
@codecov

codecov Bot commented Oct 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.50%. Comparing base (5f4f6c4) to head (df32bd7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10180      +/-   ##
==========================================
+ Coverage   81.48%   81.50%   +0.01%     
==========================================
  Files         266      266              
  Lines       41390    41399       +9     
==========================================
+ Hits        33728    33742      +14     
+ Misses       7661     7656       -5     
  Partials        1        1              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kkk777-7

kkk777-7 commented Oct 4, 2026

Copy link
Copy Markdown
Member Author

@codex

@kkk777-7 kkk777-7 mentioned this pull request Oct 4, 2026
9 of 11 tasks
@arkodg

arkodg commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

@codex review

This branch has not been deployed

No deployments
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.

Rebalancing traffic from failed backend to healthy one in httproute

2 participants