Skip to content

conformance: add GRPCRoute request mirror test (#3514)#4811

Open
Srujan-rai wants to merge 1 commit into
kubernetes-sigs:mainfrom
Srujan-rai:main
Open

conformance: add GRPCRoute request mirror test (#3514)#4811
Srujan-rai wants to merge 1 commit into
kubernetes-sigs:mainfrom
Srujan-rai:main

Conversation

@Srujan-rai
Copy link
Copy Markdown

@Srujan-rai Srujan-rai commented May 1, 2026

GRPCRoute already supports the RequestMirror filter (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:

  • Adding SupportGRPCRouteRequestMirror (GRPCRouteRequestMirror) as a new
    Extended feature in pkg/features/grpcroute.go, following the GEP-2162
    naming convention.
  • Adding conformance/utils/grpc/mirror.go with ExpectMirroredRequest, which
    reads mirror backend pod logs and matches the fully qualified gRPC method
    name — the same approach used by http.ExpectMirroredRequest.
  • Adding conformance/tests/grpcroute-request-mirror.{go,yaml}: a GRPCRoute
    that routes Echo requests to grpc-infra-backend-v1 and mirrors them to
    grpc-infra-backend-v2.
  • Patching the gRPC echo server (conformance/echo-basic/grpc/grpc.go) to log
    the fully qualified method name on each received request
    ("Echoing back gRPC request made to <method> to client"), enabling
    log-based mirror verification.

Which issue(s) this PR fixes:

Fixes #3514

Does this PR introduce a user-facing change?:

Added GRPCRouteRequestMirror conformance test. Implementations that support
the RequestMirror filter on GRPCRoute can now declare                                                                                                       
SupportGRPCRouteRequestMirror as a supported feature.

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.
@k8s-ci-robot k8s-ci-robot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label May 1, 2026
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 1, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: Srujan-rai / name: srujan-rai (56e8a72)

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Srujan-rai
Once this PR has been reviewed and has the lgtm label, please assign rikatz for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Welcome @Srujan-rai!

It looks like this is your first PR to kubernetes-sigs/gateway-api 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/gateway-api has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 1, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels May 1, 2026
@snorwin
Copy link
Copy Markdown
Member

snorwin commented May 4, 2026

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add GRPCRoute coverage in request-mirror tests

3 participants