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

fix: gernerate a catch-all route for rules with no matches and no hostnames in HTTPRoute and GRPCRoute #4528

Merged
merged 2 commits into from
Aug 18, 2023

Conversation

randmonkey
Copy link
Contributor

@randmonkey randmonkey commented Aug 17, 2023

What this PR does / why we need it:

Generate a wildcard route that matches any HTTP/GRPC requests for rules in HTTPRoute/GRPCRoute with no matches and no hostnames in their parent objects.

Which issue this PR fixes:

fixes #4526

Special notes for your reviewer:

TODO: add integration tests?
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 August 17, 2023 08:25
@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

Patch coverage: 57.1% and project coverage change: -0.1% ⚠️

Comparison is base (13c8d70) 67.9% compared to head (3756e7d) 67.8%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #4528     +/-   ##
=======================================
- Coverage   67.9%   67.8%   -0.1%     
=======================================
  Files        161     161             
  Lines      18904   18913      +9     
=======================================
- Hits       12842   12836      -6     
- Misses      5307    5318     +11     
- Partials     755     759      +4     
Files Changed Coverage Δ
internal/dataplane/parser/translate_grpcroute.go 77.7% <ø> (-0.8%) ⬇️
internal/dataplane/parser/translators/atc_utils.go 100.0% <ø> (ø)
...rnal/dataplane/parser/translators/httproute_atc.go 92.7% <43.7%> (-2.2%) ⬇️
internal/dataplane/parser/translate_httproute.go 77.5% <100.0%> (-1.1%) ⬇️
...rnal/dataplane/parser/translators/grpcroute_atc.go 93.6% <100.0%> (+<0.1%) ⬆️

... and 2 files with indirect coverage changes

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

@randmonkey randmonkey added this to the KIC v2.12.0 milestone Aug 18, 2023
Copy link
Contributor

@rainest rainest left a comment

Choose a reason for hiding this comment

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

Updated op to fix #4526.

Originally pointed to #4512, which I'm pretty sure was a copy/paste error (it's the PR that raised 4526).

@rainest rainest merged commit 63506d9 into main Aug 18, 2023
32 checks passed
@rainest rainest deleted the fix/wildcard_route_for_no_match_and_hostnames branch August 18, 2023 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow wildcard (empty) hostname GWAPI Routes
2 participants