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

feat(expression router): implement query parameter match of HTTPRoute #4780

Merged
merged 10 commits into from
Oct 18, 2023

Conversation

randmonkey
Copy link
Contributor

@randmonkey randmonkey commented Oct 7, 2023

What this PR does / why we need it:

implement query parameter matching in HTTPRoute.

Which issue this PR fixes:

fixes #3679

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

@randmonkey randmonkey requested a review from a team as a code owner October 7, 2023 08:27
@randmonkey randmonkey added the area/gateway-api Relating to upstream Kubernetes SIG Networking Gateway API label Oct 7, 2023
@randmonkey randmonkey self-assigned this Oct 7, 2023
@randmonkey randmonkey added this to the KIC v3.0.0 milestone Oct 7, 2023
@codecov
Copy link

codecov bot commented Oct 7, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (2089f87) 77.7% compared to head (73fe14d) 77.6%.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #4780     +/-   ##
=======================================
- Coverage   77.7%   77.6%   -0.2%     
=======================================
  Files        164     164             
  Lines      18399   18443     +44     
=======================================
+ Hits       14298   14313     +15     
- Misses      3281    3305     +24     
- Partials     820     825      +5     
Files Coverage Δ
internal/admission/validation/gateway/httproute.go 90.0% <100.0%> (ø)
internal/dataplane/parser/atc/predicate.go 100.0% <100.0%> (ø)
internal/dataplane/parser/translate_httproute.go 79.3% <ø> (ø)
internal/util/builder/httproutematch.go 100.0% <100.0%> (ø)
...rnal/dataplane/parser/translators/httproute_atc.go 92.9% <96.0%> (+0.1%) ⬆️
internal/dataplane/parser/atc/field.go 81.8% <50.0%> (-7.1%) ⬇️

... and 8 files with indirect coverage changes

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

@randmonkey randmonkey force-pushed the feat/support_query_string_match branch from 2744a4e to 35d67ad Compare October 9, 2023 10:42
CHANGELOG.md Outdated Show resolved Hide resolved
internal/admission/validation/gateway/httproute.go Outdated Show resolved Hide resolved
@randmonkey randmonkey force-pushed the feat/support_query_string_match branch from 1da3096 to 6d0fa9f Compare October 11, 2023 03:43
@randmonkey randmonkey force-pushed the feat/support_query_string_match branch 4 times, most recently from 5f6e16c to 5287edc Compare October 13, 2023 07:27
czeslavo
czeslavo previously approved these changes Oct 13, 2023
programmer04
programmer04 previously approved these changes Oct 13, 2023
test/consts/helm.go Outdated Show resolved Hide resolved
@pmalek
Copy link
Member

pmalek commented Oct 13, 2023

Conformance tests failed :(

    --- FAIL: TestGatewayConformance/HTTPRouteQueryParamMatching (0.06s)
        --- FAIL: TestGatewayConformance/HTTPRouteQueryParamMatching/18_request_to_'/?animal=hydra'_with_headers_should_go_to_infra-backend-v3 (30.00s)
        --- FAIL: TestGatewayConformance/HTTPRouteQueryParamMatching/1_request_to_'/?animal=dolphin'_should_go_to_infra-backend-v2 (30.00s)
        --- PASS: TestGatewayConformance/HTTPRouteQueryParamMatching/16_request_to_'/path4?animal=kraken'_should_receive_a_404 (0.00s)
        --- PASS: TestGatewayConformance/HTTPRouteQueryParamMatching/15_request_to_'/?animal=shark'_should_receive_a_404 (0.00s)
        --- FAIL: TestGatewayConformance/HTTPRouteQueryParamMatching/17_request_to_'/path5?animal=hydra'_should_go_to_infra-backend-v1 (30.00s)
        --- FAIL: TestGatewayConformance/HTTPRouteQueryParamMatching/13_request_to_'/path3?animal=shark'_should_go_to_infra-backend-v1 (30.00s)
        --- FAIL: TestGatewayConformance/HTTPRouteQueryParamMatching/12_request_to_'/path2?animal=whale'_with_headers_should_go_to_infra-backend-v3 (30.00s)
        --- FAIL: TestGatewayConformance/HTTPRouteQueryParamMatching/14_request_to_'/path4?animal=kraken'_with_headers_should_go_to_infra-backend-v1 (30.00s)
        --- PASS: TestGatewayConformance/HTTPRouteQueryParamMatching/9_request_to_'/'_should_receive_a_404 (0.00s)
        --- FAIL: TestGatewayConformance/HTTPRouteQueryParamMatching/11_request_to_'/?animal=whale'_with_headers_should_go_to_infra-backend-v2 (30.00s)
        --- PASS: TestGatewayConformance/HTTPRouteQueryParamMatching/8_request_to_'/?animal=whaledolphin'_should_receive_a_404 (0.00s)
        --- PASS: TestGatewayConformance/HTTPRouteQueryParamMatching/7_request_to_'/?animal=dog'_should_receive_a_404 (0.00s)
        --- FAIL: TestGatewayConformance/HTTPRouteQueryParamMatching/10_request_to_'/path1?animal=whale'_should_go_to_infra-backend-v1 (30.00s)
        --- FAIL: TestGatewayConformance/HTTPRouteQueryParamMatching/5_request_to_'/?animal=dolphin&color=yellow'_should_go_to_infra-backend-v2 (30.00s)
        --- FAIL: TestGatewayConformance/HTTPRouteQueryParamMatching/4_request_to_'/?animal=whale&otherparam=irrelevant'_should_go_to_infra-backend-v1 (30.00s)
        --- PASS: TestGatewayConformance/HTTPRouteQueryParamMatching/6_request_to_'/?color=blue'_should_receive_a_404 (0.01s)
        --- FAIL: TestGatewayConformance/HTTPRouteQueryParamMatching/3_request_to_'/?ANIMAL=Whale'_should_go_to_infra-backend-v3 (30.00s)
        --- FAIL: TestGatewayConformance/HTTPRouteQueryParamMatching/2_request_to_'/?animal=dolphin&color=blue'_should_go_to_infra-backend-v3 (30.00s)
        --- FAIL: TestGatewayConformance/HTTPRouteQueryParamMatching/0_request_to_'/?animal=whale'_should_go_to_infra-backend-v1 (30.00s)

@randmonkey
Copy link
Contributor Author

randmonkey commented Oct 14, 2023

@pmalek it is because the helm chart version is NOT updated to the latest by the renovate:

TEST_KONG_HELM_CHART_VERSION: 2.26.3

Merging #4846 not only made conflicts for the PR, but also changed helm chart version used in conformance tests back. It should be fixed after renovate updates charts version to the latest.
Update: renovate has updated helm chart version and conformance tests passed.

@randmonkey randmonkey merged commit 1022266 into main Oct 18, 2023
35 checks passed
@randmonkey randmonkey deleted the feat/support_query_string_match branch October 18, 2023 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gateway-api Relating to upstream Kubernetes SIG Networking Gateway API size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

extended conformance - HTTPRouteQueryParamMatching
4 participants