Repository navigation
feat(translator): implement backendPriority HTTPRouteFilter - #10248
Conversation
Signed-off-by: kkk777-7 <[email protected]>
Signed-off-by: kkk777-7 <[email protected]>
✅ 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. |
Signed-off-by: kkk777-7 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3abe7bcfe1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10248 +/- ##
==========================================
+ Coverage 81.81% 81.88% +0.06%
==========================================
Files 268 268
Lines 42376 42429 +53
==========================================
+ Hits 34669 34741 +72
+ Misses 7706 7687 -19
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: kkk777-7 <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d26ee93369
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d26ee93369
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
|
Codex Review: Didn't find any major issues. Can't wait for the next one! 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". |
|
@kkk777-7 can you fix the conflict? |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f8a496cc5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
|
Non-blocking, fine as a follow-up. When something else splits the rule into weighted clusters, for example a |
…3094) **Description** `AIGatewayRouteRuleBackendRef.priority` was invisible to Envoy Gateway: the extension server rewrote LocalityLbEndpoints.priority in `PostTranslateModify`, and the controller stamped `gateway.envoyproxy.io/backend-ref-priority` annotation on every generated HTTPRoute to force re-translation. EG copies that annotation into the metadata of every route and cluster, which inflates xDS, and EG could not see the priority, so MergeBackends split prioritized rules into separate clusters and broke failover. This uses the backendPriority HTTPRouteFilter added in EG v1.10 instead: - For each backendRef with a non-zero priority, reference a shared per-namespace HTTPRouteFilter (ai-eg-backend-priority-<n>). Priority 0 gets no filter, which keeps rules without priorities eligible for MergeBackends. - The filters are labeled managed-by and are not owned by any AIGatewayRoute. A filter is deleted once no AIGatewayRoute in the namespace uses its priority, which is looked up through a new AIGatewayRoute field index. A filter that is deleted out of band is recreated on the next reconcile. **Related Issues/PRs (if applicable)** Fixes #2915 Related PR: envoyproxy/gateway#10027 (backendPriority API), envoyproxy/gateway#10248 (implementation) **Special notes for reviewers (if applicable)** Migration: - The extension server rewrite is kept for one release (to be removed in v1.5) so that HTTPRoutes generated by the previous version keep their priorities until they are reconciled. It logs when it changes the priority EG set, so it can be confirmed unused before removal. - A non-zero priority overrides the Backend's spec.fallback. Priority 0 no longer does, so fallback: true on a Backend now takes effect. **E2E on Envoy Gateway v1.9.3 skips `TestTrafficSplittingFallback` and `Test_Examples_StreamIdleTimeout`.** Both rely on backendRef priority failover. The CI matrix still runs e2e on EG v1.9.3, which has no `backendPriority`: the CRD prunes the field, and any backendRef filter makes EG build one cluster per backendRef of the rule, so the backendRefs end up behind `weighted_clusters` and do not fail over. v1.9 is below the minimum EG version (v1.10.0) in the compatibility matrix, so these tests are skipped there via `e2elib.EnvoyGatewaySupportsBackendPriority`, like the other version-gated e2e tests. Agent Router v1.2.x / v1.3.x keep the previous mechanism and are not affected. **Shared filters instead of per-route ones.** EG scans `resources.HTTPRouteFilters` linearly for each reference, so the filters are shared per namespace and priority (at most 128 per namespace) rather than created per AIGatewayRoute. As with the shared MCP proxy Backend (`ensureMCPProxyBackend`), they have no owner and are not watched. --------- Signed-off-by: kkk777-7 <[email protected]> Co-authored-by: Ignasi Barrera <[email protected]>
What this PR does / why we need it:
Implements #10007. (API PR was merged #10027)
When the filter is referenced from
HTTPBackendRef.filters, it sets the Envoy locality priority of that backendRef's endpoints, enabling multi-tier, per-route priority failover between the backendRefs of a rule.Notes
Backend.spec.fallbackhas the same limitation today. Detecting and reporting these combinations is left to a follow-up.Which issue(s) this PR fixes:
Fixes #10007
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.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.make gen-checkand committed the result if API/helm charts/modules changed.release-notes/current/breaking_changes/.