Repository navigation
Conversation
…ckendRef Signed-off-by: zirain <zirain2009@gmail.com>
A weight-0 HTTPRoute/GRPCRoute backendRef was dropped from the IR, so its cluster was only created when a canary rollout first raised its weight, pushing CDS/EDS at the same time traffic started. Keep zero-weight destinations in the route's settings and merged BackendClusters, without adding them to the BackendWeights sums, and emit them as zero-weight weighted_clusters entries. A zero-weight setting always gets its own cluster with a locality weight of 1, since Envoy rejects a zero locality weight. Fixes envoyproxy#10459 Assisted-by: Claude Opus 5.5 Signed-off-by: YuMin Kim <yuminkim.dev@gmail.com>
Signed-off-by: YuMin Kim <yuminkim.dev@gmail.com> Assisted-by: Claude Opus 5.5
✅ Deploy Preview for cerulean-figolla-1f9435 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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. |
✅ Deploy Preview for cerulean-figolla-1f9435 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
A
weight: 0backendRef on an HTTPRoute or GRPCRoute was dropped from the IR, so its cluster did not exist in xDS until the weight went above 0. With Argo Rollouts or Flagger, the first canary step then pushed CDS/EDS at the same moment traffic started (cold start), and the canary cluster could not be inspected before receiving traffic.This follows the IR/xDS direction in #10459:
internal/gatewayapi/route.go): removed the three zero-weight skips (theprocessDestinationearly return, the HTTPRoute/GRPCRoute rule loops, and theprocessBackendRefearly return before merging). Zero-weight destinations now stay in the route'sSettings/ mergedBackendClusters. They add 0 toBackendWeights, so the 500/503 proportions are unchanged and a rule whose refs are all weight 0 still gets the direct 500. WithmergeBackends, a weight-0 ref goes through the normal merge/demerge logic.RouteDestination.NeedsClusterPerSettingnow returns true when a setting has weight 0, so the setting gets its own cluster and aweighted_clustersentry withweight: 0. This also means a 100/0 split already usesweighted_clusters, and ramping the canary does not change the route action type.buildWeightedLocalitiesuses locality weight 1 for a zero-weight setting, because Envoy rejectsLocalityLbEndpoints.load_balancing_weight < 1.Things reviewers may want to check:
%BACKEND_REFS%route stat names, which stay the same while the weight is ramped.egctl config, admin/clusters) for backends that get no traffic yet. This is intended.Golden changes:
mergebackends-http-canary-same-service-zero-weight(from #10458) now has thecanary/4000merged cluster with a route weight of 0, andhttproute-rule-with-multiple-backends-and-weightskeeps its weight-0 setting. New xDS fixture:http-route-weighted-backend-zero-weight(inline settings and merged backend clusters).The first commit is zirain's #10458, cherry-picked unchanged with original authorship and sign-off, so this PR rebases cleanly once #10458 merges.
AI disclosure: this change was prepared with Claude Opus 5.5 (Claude Code).
Which issue(s) this PR fixes:
Fixes #10459
PR Checklist
git commit -s). See DCO: Sign your work./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.release-notes/current/breaking_changes/.🤖 Generated with Claude Code
https://claude.ai/code/session_012bPQTxDmyCAwQaT3PtwxBr