Skip to content

fix: ignore useClientProtocol for gRPC backends - #10807

Draft
zhaohuabing wants to merge 2 commits into
envoyproxy:mainfrom
zhaohuabing:fix-10806-ucp-grpc
Draft

zhaohuabing wants to merge 2 commits into
envoyproxy:mainfrom
zhaohuabing:fix-10806-ucp-grpc

Conversation

@zhaohuabing

@zhaohuabing zhaohuabing commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

What this PR does / why we need it:

BackendTrafficPolicy no longer applies useClientProtocol to a route or merged cluster that reaches a gRPC backend, so those clusters keep their explicit HTTP/2 config. The policy gets a Warning condition with reason UnsupportedField that lists the affected routes, or backends when mergeBackends is on.

  • This covers GRPCRoutes and HTTPRoutes to a Service port with appProtocol: grpc, whether the policy targets the route, a Gateway, a ListenerSet, or the backend.
  • The new warning reuses the list the policy already keeps for HTTP/3 warnings, so a policy with both gets one condition with reason Warnings.
  • Since useClientProtocol is now dropped before the HTTP/3 check, gRPC routes no longer get the "useClientProtocol cannot be used together with http3" warning.

Which issue(s) this PR fixes:

Fixes #10806


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: N/A: no 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: N/A: the behavior is reported on the policy status.
  • 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: N/A: no API, helm chart, or module changes.
  • 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.

useClientProtocol made Envoy send HTTP/1.1 gRPC-Web requests to gRPC backends over
HTTP/1.1, which they reject. It's now left off routes and merged clusters that reach a
gRPC backend, so they keep HTTP/2, and the policy gets an UnsupportedField warning.

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>
@netlify

netlify Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

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

Built without sensitive environment variables

Name Link
🔨 Latest commit eecaab2
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6b1276323333efbca9e1f963
😎 Deploy Preview https://deploy-preview-10807--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.

@zhaohuabing
zhaohuabing marked this pull request as ready for review December 4, 2026 08:19
@zhaohuabing
zhaohuabing requested a review from a team as a code owner December 4, 2026 08:19
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-04T08:25:18.667020Z eecaab2 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@zhaohuabing zhaohuabing added this to the v1.11.0-rc.1 Release milestone Dec 4, 2026
@codecov

codecov Bot commented Dec 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.59091% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.88%. Comparing base (6ec0ba5) to head (eecaab2).

Files with missing lines Patch % Lines
internal/gatewayapi/backendtrafficpolicy.go 96.42% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10807      +/-   ##
==========================================
+ Coverage   82.86%   82.88%   +0.02%     
==========================================
  Files         278      278              
  Lines       44695    44728      +33     
==========================================
+ Hits        37036    37075      +39     
+ Misses       7658     7652       -6     
  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.

@zhaohuabing
zhaohuabing marked this pull request as draft December 4, 2026 13:10

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.

useClientProtocol breaks gRPC-Web clients that use HTTP/1.1 when the backend is gRPC

1 participant