Skip to content

fix bug with grpcroute mirror filter - #8541

Merged
jukie merged 4 commits into
envoyproxy:mainfrom
aburanrbx:adam--fix-grpcroute-mirror-issue
Mar 23, 2026
Merged

jukie merged 4 commits into
envoyproxy:mainfrom
aburanrbx:adam--fix-grpcroute-mirror-issue

Conversation

@aburanrbx

Copy link
Copy Markdown

What type of PR is this?
fix(provider): add RequestMirror backendRef indexing for GRPCRoute

What this PR does / why we need it:

The GRPCRoute backend indexer (backendGRPCRouteIndexFunc) is missing RequestMirror filter support. It only iterates over rule.BackendRefs and never inspects rule.Filters for RequestMirror entries. Since the indexer tells the resource collector which services a route depends on, the mirror target service is never loaded into the translation resource map. When validateBackendRefService calls t.GetService(), the service isn't found and the route is rejected with "service not found" — even though the service exists in the cluster.

This is the same bug as #5495 (for HTTPRoute), which was fixed in #5497, but the fix was only applied to backendHTTPRouteIndexFunc and never carried over to backendGRPCRouteIndexFunc.

The fix adds the same RequestMirror filter iteration to backendGRPCRouteIndexFunc that already exists in backendHTTPRouteIndexFunc, appending the mirror's BackendRef to the indexed backend refs.

Which issue(s) this PR fixes:

Fixes #6875

Release Notes: Yes

@aburanrbx
aburanrbx requested a review from a team as a code owner March 17, 2026 21:15
@netlify

netlify Bot commented Mar 17, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cerulean-figolla-1f9435 canceled.

Name Link
🔨 Latest commit f8b1081
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/69c0c4ad706c5b00088cba6b

@zirain

zirain commented Mar 17, 2026

Copy link
Copy Markdown
Member

can you add test and release notes for this?

Signed-off-by: Adam Buran <[email protected]>
Signed-off-by: Adam Buran <[email protected]>
arkodg
arkodg previously approved these changes Mar 23, 2026

@arkodg arkodg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks

@codecov

codecov Bot commented Mar 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.18%. Comparing base (dd0c09f) to head (f8b1081).
⚠️ Report is 50 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8541      +/-   ##
==========================================
+ Coverage   74.16%   74.18%   +0.01%     
==========================================
  Files         242      242              
  Lines       37804    37821      +17     
==========================================
+ Hits        28039    28056      +17     
- Misses       7809     7810       +1     
+ Partials     1956     1955       -1     

☔ View full report in Codecov by Sentry.
📢 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.

@jukie
jukie merged commit e633c08 into envoyproxy:main Mar 23, 2026
46 of 48 checks passed
rudrakhp pushed a commit to rudrakhp/gateway that referenced this pull request Apr 15, 2026
* fix bug with grpcroute mirror filter

Signed-off-by: Adam Buran <[email protected]>

* add indexers test

Signed-off-by: Adam Buran <[email protected]>

* add release note

Signed-off-by: Adam Buran <[email protected]>

---------

Signed-off-by: Adam Buran <[email protected]>
Signed-off-by: Arko Dasgupta <[email protected]>
Co-authored-by: Arko Dasgupta <[email protected]>
Signed-off-by: Rudrakh Panigrahi <[email protected]>
rudrakhp added a commit that referenced this pull request Apr 16, 2026
* fix: avoid metric increments on no-op delete reconcile paths (#8480)

* fix: avoid metric increments on no-op delete reconcile paths

Signed-off-by: Felipe Sabadini Facina <[email protected]>

* Update internal/infrastructure/kubernetes/infra_resource_test.go

Signed-off-by: Isaac Wilson <[email protected]>

* Update internal/infrastructure/kubernetes/infra_resource_test.go

Signed-off-by: Isaac Wilson <[email protected]>

---------

Signed-off-by: Felipe Sabadini Facina <[email protected]>
Signed-off-by: Isaac Wilson <[email protected]>
Co-authored-by: Isaac Wilson <[email protected]>
Signed-off-by: Rudrakh Panigrahi <[email protected]>

* fix: restore failure-path metric recording for delete and HPA reconcile (#8656)

Fixes #8651

Signed-off-by: Felipe Sabadini Facina <[email protected]>
Signed-off-by: Rudrakh Panigrahi <[email protected]>

* fix: helm secrets rbac for gateway namespace with watch list of namespaces (#8706)

* fix: helm secrets rbac for gateway namespace with watch list of namespaces

Signed-off-by: Karol Szwaj <[email protected]>

* add release notes

Signed-off-by: Karol Szwaj <[email protected]>

* review update

Signed-off-by: Karol Szwaj <[email protected]>

---------

Signed-off-by: Karol Szwaj <[email protected]>
Co-authored-by: Rudrakh Panigrahi <[email protected]>
Signed-off-by: Rudrakh Panigrahi <[email protected]>

* fix: handle network errors in rate limit e2e tests (#8446)

Signed-off-by: Rudrakh Panigrahi <[email protected]>

* fix: propagate the HTTPFilter translation errors to the outer layer (#7556)

* progate the HTTPFilter validation errors to the outer layer

Signed-off-by: Huabing Zhao <[email protected]>
Signed-off-by: Rudrakh Panigrahi <[email protected]>

* fix: return 500 error for invalid filters (#7605)

return 500 error for invalid filters

Signed-off-by: Huabing Zhao <[email protected]>
Signed-off-by: Rudrakh Panigrahi <[email protected]>

* fix: prevent configuring requestMirror filter and directResponse/RequestRedirect filter together (#7474)

* fix: prevent configuring RequestMirror and DirectResponse filters together

Signed-off-by: Huabing Zhao <[email protected]>

check redirect respose filter

Signed-off-by: Huabing Zhao <[email protected]>

* address comments

Signed-off-by: Huabing Zhao <[email protected]>

* fix lint

Signed-off-by: Huabing Zhao <[email protected]>

---------

Signed-off-by: Huabing Zhao <[email protected]>
Signed-off-by: Rudrakh Panigrahi <[email protected]>

* fix bug with grpcroute mirror filter (#8541)

* fix bug with grpcroute mirror filter

Signed-off-by: Adam Buran <[email protected]>

* add indexers test

Signed-off-by: Adam Buran <[email protected]>

* add release note

Signed-off-by: Adam Buran <[email protected]>

---------

Signed-off-by: Adam Buran <[email protected]>
Signed-off-by: Arko Dasgupta <[email protected]>
Co-authored-by: Arko Dasgupta <[email protected]>
Signed-off-by: Rudrakh Panigrahi <[email protected]>

* fix: normalize CRLF line endings in htpasswd basic auth secrets (#8557)

Fixes #8554

Signed-off-by: stekole <[email protected]>
Signed-off-by: stekole <[email protected]>
Signed-off-by: Rudrakh Panigrahi <[email protected]>

* fix: status for mirror backend (#8675)

Signed-off-by: kkk777-7 <[email protected]>
Signed-off-by: Rudrakh Panigrahi <[email protected]>

* fix: set HTTPRoute Accepted condition as true with mixed invalid and valid rules (#7625)

* set HTTPRoute Accepted condition as true with mixed invalid and valid rules

Signed-off-by: Huabing Zhao <[email protected]>
Signed-off-by: Rudrakh Panigrahi <[email protected]>

* fix: basic auth validation (#8053)

* fix basic auth validation

Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Rudrakh Panigrahi <[email protected]>

* [release/v1.6] fix gen check

Signed-off-by: Rudrakh Panigrahi <[email protected]>

---------

Signed-off-by: Felipe Sabadini Facina <[email protected]>
Signed-off-by: Isaac Wilson <[email protected]>
Signed-off-by: Rudrakh Panigrahi <[email protected]>
Signed-off-by: Karol Szwaj <[email protected]>
Signed-off-by: Huabing Zhao <[email protected]>
Signed-off-by: Adam Buran <[email protected]>
Signed-off-by: Arko Dasgupta <[email protected]>
Signed-off-by: stekole <[email protected]>
Signed-off-by: stekole <[email protected]>
Signed-off-by: kkk777-7 <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Co-authored-by: Felipe Sabadini <[email protected]>
Co-authored-by: Isaac Wilson <[email protected]>
Co-authored-by: Karol Szwaj <[email protected]>
Co-authored-by: Huabing (Robin) Zhao <[email protected]>
Co-authored-by: aburanrbx <[email protected]>
Co-authored-by: Arko Dasgupta <[email protected]>
Co-authored-by: stekole <[email protected]>
Co-authored-by: Kota Kimura <[email protected]>
cnvergence pushed a commit to cnvergence/gateway that referenced this pull request Apr 16, 2026
* fix bug with grpcroute mirror filter

Signed-off-by: Adam Buran <[email protected]>

* add indexers test

Signed-off-by: Adam Buran <[email protected]>

* add release note

Signed-off-by: Adam Buran <[email protected]>

---------

Signed-off-by: Adam Buran <[email protected]>
Signed-off-by: Arko Dasgupta <[email protected]>
Co-authored-by: Arko Dasgupta <[email protected]>
(cherry picked from commit e633c08)
Signed-off-by: Karol Szwaj <[email protected]>
cnvergence added a commit that referenced this pull request Apr 16, 2026
* fix: handle network errors in rate limit e2e tests (#8446)

Signed-off-by: Rudrakh Panigrahi <[email protected]>
(cherry picked from commit b0638d5)
Signed-off-by: Karol Szwaj <[email protected]>

* refactor/perf: use LuaPerRoute instead of FilterConfig (#8355)

perf: use LuaPerRoute instead of FilterConfig

Signed-off-by: Rudrakh Panigrahi <[email protected]>
(cherry picked from commit f31ac4e)
Signed-off-by: Karol Szwaj <[email protected]>

* fix: per-endpoint hostname override blocked by auto-generated wildcad host (#8565)

* fix: per-endpoint hostname override blocked by auto-generated wildcard host

Signed-off-by: zirain <[email protected]>

* add UT

Signed-off-by: zirain <[email protected]>

---------

Signed-off-by: zirain <[email protected]>
(cherry picked from commit 595010a)
Signed-off-by: Karol Szwaj <[email protected]>

* fix bug with grpcroute mirror filter (#8541)

* fix bug with grpcroute mirror filter

Signed-off-by: Adam Buran <[email protected]>

* add indexers test

Signed-off-by: Adam Buran <[email protected]>

* add release note

Signed-off-by: Adam Buran <[email protected]>

---------

Signed-off-by: Adam Buran <[email protected]>
Signed-off-by: Arko Dasgupta <[email protected]>
Co-authored-by: Arko Dasgupta <[email protected]>
(cherry picked from commit e633c08)
Signed-off-by: Karol Szwaj <[email protected]>

* fix: normalize CRLF line endings in htpasswd basic auth secrets (#8557)

Fixes #8554

Signed-off-by: stekole <[email protected]>
Signed-off-by: stekole <[email protected]>
(cherry picked from commit 9cac348)
Signed-off-by: Karol Szwaj <[email protected]>

* fix: avoid metric increments on no-op delete reconcile paths (#8480)

* fix: avoid metric increments on no-op delete reconcile paths

Signed-off-by: Felipe Sabadini Facina <[email protected]>

* Update internal/infrastructure/kubernetes/infra_resource_test.go

Signed-off-by: Isaac Wilson <[email protected]>

* Update internal/infrastructure/kubernetes/infra_resource_test.go

Signed-off-by: Isaac Wilson <[email protected]>

---------

Signed-off-by: Felipe Sabadini Facina <[email protected]>
Signed-off-by: Isaac Wilson <[email protected]>
Co-authored-by: Isaac Wilson <[email protected]>
(cherry picked from commit 7a2a4ec)
Signed-off-by: Karol Szwaj <[email protected]>

* fix(telemetry): support BackendTLSPolicy for telemetry backends (#8545)

* fix(telemetry): support BackendTLSPolicy for telemetry backends

processBackendRefs does not look up BackendTLSPolicy for telemetry
backends (access logs, tracing, metrics), so TLS can only be configured
via Backend.spec.tls. Replace inline processServerValidationTLSSettings
with applyBackendTLSSetting so telemetry backends get the full Backend +
BackendTLSPolicy + EnvoyProxy TLS merge.

Workaround: theagentrouter/agent-router#1964

Signed-off-by: Adrian Cole <[email protected]>
(cherry picked from commit ac18feb)
Signed-off-by: Karol Szwaj <[email protected]>

* fix: restore failure-path metric recording for delete and HPA reconcile (#8656)

Fixes #8651

Signed-off-by: Felipe Sabadini Facina <[email protected]>
(cherry picked from commit 2a5bfd0)
Signed-off-by: Karol Szwaj <[email protected]>

* fix: status for mirror backend (#8675)

Signed-off-by: kkk777-7 <[email protected]>
(cherry picked from commit fa81778)
Signed-off-by: Karol Szwaj <[email protected]>

* fix: client certificate secret never delivered when it is exclusively referenced by a SecurityPolicy extAuth Backend (#8654)

* fix: client certificate secret never delivered when it is exclusively referenced by a SecurityPolicy extAuth Backend

Signed-off-by: zirain <[email protected]>

* fix lint

Signed-off-by: zirain <[email protected]>

---------

Signed-off-by: zirain <[email protected]>
(cherry picked from commit c7e21fa)
Signed-off-by: Karol Szwaj <[email protected]>

* fix: client certificate secret never delivered when it is exclusively referenced by a SecurityPolicy jwt/oidc Backend (#8711)

Signed-off-by: zirain <[email protected]>
(cherry picked from commit 95c3a79)
Signed-off-by: Karol Szwaj <[email protected]>

* fix: helm secrets rbac for gateway namespace with watch list of namespaces (#8706)

* fix: helm secrets rbac for gateway namespace with watch list of namespaces

Signed-off-by: Karol Szwaj <[email protected]>

* add release notes

Signed-off-by: Karol Szwaj <[email protected]>

* review update

Signed-off-by: Karol Szwaj <[email protected]>

---------

Signed-off-by: Karol Szwaj <[email protected]>
Co-authored-by: Rudrakh Panigrahi <[email protected]>
(cherry picked from commit c48a346)
Signed-off-by: Karol Szwaj <[email protected]>

* add release notes

Signed-off-by: Karol Szwaj <[email protected]>

* fix lint

Signed-off-by: Karol Szwaj <[email protected]>

* fix lint

Signed-off-by: Karol Szwaj <[email protected]>

---------

Signed-off-by: Rudrakh Panigrahi <[email protected]>
Signed-off-by: Karol Szwaj <[email protected]>
Signed-off-by: zirain <[email protected]>
Signed-off-by: Adam Buran <[email protected]>
Signed-off-by: Arko Dasgupta <[email protected]>
Signed-off-by: stekole <[email protected]>
Signed-off-by: stekole <[email protected]>
Signed-off-by: Felipe Sabadini Facina <[email protected]>
Signed-off-by: Isaac Wilson <[email protected]>
Signed-off-by: Adrian Cole <[email protected]>
Signed-off-by: kkk777-7 <[email protected]>
Co-authored-by: Rudrakh Panigrahi <[email protected]>
Co-authored-by: zirain <[email protected]>
Co-authored-by: aburanrbx <[email protected]>
Co-authored-by: Arko Dasgupta <[email protected]>
Co-authored-by: stekole <[email protected]>
Co-authored-by: Felipe Sabadini <[email protected]>
Co-authored-by: Isaac Wilson <[email protected]>
Co-authored-by: Adrian Cole <[email protected]>
Co-authored-by: Kota Kimura <[email protected]>
LakshmirajSunilSawant added a commit to LakshmirajSunilSawant/modelgate that referenced this pull request Nov 7, 2026
Envoy Gateway before v1.8.0 does not index the Services that GRPCRoute
RequestMirror filters point at, so it rejects the route as soon as shadow
mode adds the mirror (envoyproxy/gateway#8541) and every gRPC call fails
with UNIMPLEMENTED. The e2e grpc job hit exactly this. kind-up now installs
v1.9.3, and the README notes the requirement.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
LakshmirajSunilSawant added a commit to LakshmirajSunilSawant/modelgate that referenced this pull request Nov 7, 2026
Envoy Gateway before v1.8.0 does not index the Services that GRPCRoute
RequestMirror filters point at, so it rejects the route as soon as shadow
mode adds the mirror (envoyproxy/gateway#8541) and every gRPC call fails
with UNIMPLEMENTED. The e2e grpc job hit exactly this. kind-up now installs
v1.9.3, and the README notes the requirement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants