conformance: add GRPCRoute request mirror test (#3514)#4811
Conversation
Add a conformance test for the RequestMirror filter on GRPCRoute (Extended support). - Introduce SupportGRPCRouteRequestMirror feature constant - Add grpc.ExpectMirroredRequest utility to verify mirror pod logs - Add test manifest to mirror traffic from grpc-infra-backend-v1 to v2 - Update gRPC echo server to log fully qualified method names per request This allows mirror verification using the same pattern as the HTTP mirror test.
|
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Srujan-rai The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @Srujan-rai! |
|
Hi @Srujan-rai. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@Srujan-rai thanks for the PR! Could you help clarify how this differs from what's proposed in #4060? Also, were you able to validate the new tests against a Gateway API implementation? If so, could you let us know which one? |
GRPCRoute already supports the
RequestMirrorfilter (Extended conformance,apis/v1/grpcroute_types.go), but there were no conformance tests to verify implementations support it correctly.This PR adds end-to-end conformance coverage by:
SupportGRPCRouteRequestMirror(GRPCRouteRequestMirror) as a newExtended feature in
pkg/features/grpcroute.go, following the GEP-2162naming convention.
conformance/utils/grpc/mirror.gowithExpectMirroredRequest, whichreads mirror backend pod logs and matches the fully qualified gRPC method
name — the same approach used by
http.ExpectMirroredRequest.conformance/tests/grpcroute-request-mirror.{go,yaml}: a GRPCRoutethat routes
Echorequests togrpc-infra-backend-v1and mirrors them togrpc-infra-backend-v2.conformance/echo-basic/grpc/grpc.go) to logthe fully qualified method name on each received request
(
"Echoing back gRPC request made to <method> to client"), enablinglog-based mirror verification.
Which issue(s) this PR fixes:
Fixes #3514
Does this PR introduce a user-facing change?: