Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conformance: add support for GRPCRoute #5776

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

tao12345666333
Copy link
Member

@tao12345666333 tao12345666333 commented Mar 28, 2024

What this PR does / why we need it:

Which issue this PR fixes:

fixes: #5705

Special notes for your reviewer:

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@tao12345666333 tao12345666333 added the kind/conformance Conformance to upstream Kubernetes SIG Networking Gateway API label Mar 28, 2024
@tao12345666333
Copy link
Member Author

tao12345666333 commented Mar 28, 2024

  --- FAIL: TestGatewayConformance/GRPCExactMethodMatching (0.07s)
        --- PASS: TestGatewayConformance/GRPCExactMethodMatching/2_request_to_'/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/EchoThree'_should_receive_a_Unimplemented_(12) (0.01s)
        --- FAIL: TestGatewayConformance/GRPCExactMethodMatching/0_request_to_'/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_should_go_to_grpc-infra-backend-v1 (30.00s)
        --- FAIL: TestGatewayConformance/GRPCExactMethodMatching/1_request_to_'/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/EchoTwo'_should_go_to_grpc-infra-backend-v2 (30.00s)
    --- FAIL: TestGatewayConformance/GRPCRouteHeaderMatching (0.06s)
        --- FAIL: TestGatewayConformance/GRPCRouteHeaderMatching/1_request_to_'/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_with_headers_'{Version:two}'_should_go_to_grpc-infra-backend-v2 (30.00s)
        --- FAIL: TestGatewayConformance/GRPCRouteHeaderMatching/7_request_to_'/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_with_headers_'{Color:green}'_should_go_to_grpc-infra-backend-v1 (30.00s)
        --- FAIL: TestGatewayConformance/GRPCRouteHeaderMatching/8_request_to_'/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_with_headers_'{Color:red}'_should_go_to_grpc-infra-backend-v2 (30.00s)
        --- FAIL: TestGatewayConformance/GRPCRouteHeaderMatching/9_request_to_'/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_with_headers_'{Color:yellow}'_should_go_to_grpc-infra-backend-v2 (30.00s)
        --- PASS: TestGatewayConformance/GRPCRouteHeaderMatching/10_request_to_'/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_with_headers_'{Color:purple}'_should_receive_a_Unimplemented_(12) (0.01s)
        --- PASS: TestGatewayConformance/GRPCRouteHeaderMatching/4_request_to_'/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_with_headers_'{Color:orange}'_should_receive_a_Unimplemented_(12) (0.00s)
        --- FAIL: TestGatewayConformance/GRPCRouteHeaderMatching/6_request_to_'/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_with_headers_'{Color:blue}'_should_go_to_grpc-infra-backend-v1 (30.00s)
        --- FAIL: TestGatewayConformance/GRPCRouteHeaderMatching/3_request_to_'/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_with_headers_'{Color:blue,Version:two}'_should_go_to_grpc-infra-backend-v2 (30.00s)
        --- PASS: TestGatewayConformance/GRPCRouteHeaderMatching/5_request_to_'/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_with_headers_'{Some-Other-Header:one}'_should_receive_a_Unimplemented_(12) (0.00s)
        --- FAIL: TestGatewayConformance/GRPCRouteHeaderMatching/2_request_to_'/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_with_headers_'{Color:orange,Version:two}'_should_go_to_grpc-infra-backend-v1 (30.00s)
        --- FAIL: TestGatewayConformance/GRPCRouteHeaderMatching/0_request_to_'/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_with_headers_'{Version:one}'_should_go_to_grpc-infra-backend-v1 (30.00s)
    --- FAIL: TestGatewayConformance/GRPCRouteListenerHostnameMatching (1.29s)
        --- FAIL: TestGatewayConformance/GRPCRouteListenerHostnameMatching/1_request_to_'foo.bar.com/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_should_go_to_grpc-infra-backend-v2 (30.00s)
        --- FAIL: TestGatewayConformance/GRPCRouteListenerHostnameMatching/3_request_to_'boo.bar.com/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_should_go_to_grpc-infra-backend-v3 (30.00s)
        --- FAIL: TestGatewayConformance/GRPCRouteListenerHostnameMatching/7_request_to_'no.matching.host/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_should_receive_a_Unimplemented_(12) (30.00s)
        --- FAIL: TestGatewayConformance/GRPCRouteListenerHostnameMatching/5_request_to_'multiple.prefixes.foo.com/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_should_go_to_grpc-infra-backend-v3 (30.00s)
        --- FAIL: TestGatewayConformance/GRPCRouteListenerHostnameMatching/6_request_to_'foo.com/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_should_receive_a_Unimplemented_(12) (30.00s)
        --- FAIL: TestGatewayConformance/GRPCRouteListenerHostnameMatching/4_request_to_'multiple.prefixes.bar.com/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_should_go_to_grpc-infra-backend-v3 (30.00s)
        --- FAIL: TestGatewayConformance/GRPCRouteListenerHostnameMatching/0_request_to_'bar.com/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_should_go_to_grpc-infra-backend-v1 (30.00s)
        --- FAIL: TestGatewayConformance/GRPCRouteListenerHostnameMatching/2_request_to_'baz.bar.com/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_should_go_to_grpc-infra-backend-v3 (30.00s)

most of these tests have failed.

Copy link

codecov bot commented Mar 28, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 8 lines in your changes are missing coverage. Please review.

Please upload report for BASE (main@26c26ed). Learn more about missing BASE report.
Report is 1 commits behind head on main.

Current head 1c6a1cb differs from pull request most recent head 8e0286f

Please upload reports for the commit 8e0286f to get more accurate results.

Files Patch % Lines
...nternal/controllers/gateway/route_parent_status.go 0.0% 5 Missing ⚠️
...ternal/dataplane/translator/translate_grpcroute.go 66.6% 1 Missing and 1 partial ⚠️
...ternal/controllers/gateway/grpcroute_controller.go 0.0% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##             main   #5776   +/-   ##
======================================
  Coverage        ?   73.6%           
======================================
  Files           ?     193           
  Lines           ?   18814           
  Branches        ?       0           
======================================
  Hits            ?   13848           
  Misses          ?    4005           
  Partials        ?     961           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tao12345666333
Copy link
Member Author

Blocked by #5918

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
@tao12345666333
Copy link
Member Author

For TEST_KONG_ROUTER_FLAVOR=traditional_compatible make test.conformance, there is a failed case here.

        --- FAIL: TestGatewayConformance/GRPCRouteHeaderMatching/3_request_to_'/gateway_api_conformance.echo_basic.grpcecho.GrpcEcho/Echo'_with_headers_'{Color:blue,Version:two}'_should_go_to_grpc-infra-backend-v2 (30.00s)

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
@tao12345666333 tao12345666333 marked this pull request as ready for review May 19, 2024 00:07
@tao12345666333 tao12345666333 requested a review from a team as a code owner May 19, 2024 00:07
Copy link
Contributor

@randmonkey randmonkey left a comment

Choose a reason for hiding this comment

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

Almost LGTM. some minor comments

test/conformance/suite_test.go Show resolved Hide resolved
test/consts.go Outdated Show resolved Hide resolved
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
@@ -24,12 +24,23 @@ import (
var skippedTestsForTraditionalRoutes = []string{
// core conformance
tests.HTTPRouteHeaderMatching.ShortName,
// Kong gateway does not support this feature
Copy link
Member

Choose a reason for hiding this comment

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

This is quite sad, as it means we cannot claim GRPC conformance. Can you provide some details on why this fails?

Copy link
Member Author

Choose a reason for hiding this comment

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

I will provide a reproduction of it and offer more information.

Copy link
Member

@programmer04 programmer04 left a comment

Choose a reason for hiding this comment

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

LGTM, please check whether docs need any updates with the current Kong Gateway this caveat may not be true as discussed on Slack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/conformance Conformance to upstream Kubernetes SIG Networking Gateway API size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GRPCRoute conformance
4 participants