-
Notifications
You must be signed in to change notification settings - Fork 593
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
chore(refactor): streamline logic for HTTPRoute configuration generation #6741
base: main
Are you sure you want to change the base?
Conversation
3483871
to
aefa653
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6741 +/- ##
=======================================
- Coverage 77.1% 76.8% -0.3%
=======================================
Files 211 211
Lines 25299 25349 +50
=======================================
- Hits 19517 19491 -26
- Misses 4773 4837 +64
- Partials 1009 1021 +12 ☔ View full report in Codecov by Sentry. |
Thanks for the info @randmonkey I have stacked changes for propagating named routes (#6582), but I suppose they should be applied after your change will be merged |
aefa653
to
51d091d
Compare
9443c17
to
a6d1e07
Compare
a6d1e07
to
ae04588
Compare
@programmer04 There are some conflicts here to resolve after the above mentioned PRs merged. Do you still intend to merge this one? |
Removing from 3.4 as that has already shipped and we're most likely not going to backport this. Correct me if I'm wrong @programmer04. |
Pull request was converted to draft
What this PR does / why we need it:
Function
GenerateKongRouteFromTranslation(...)
is used only for validation (the fact that it is used for both flavors for validation leads to confusion). Furthermore, code related to expression routes is used only here + in tests.This PR renames
GenerateKongExpressionRoutesFromTranslation(...)
toGenerateKongExpressionRoutesFromTranslationForValidation(...)
and uses it explicitly in admission validation. It removesGenerateKongRouteFromTranslation(...)
and does some opportunistic refeactors cleanups. Also, it gets rid of redundant parameters, helpers, etc.Which issue this PR fixes:
Discovered during work on
Special notes for your reviewer:
Changes in that PR improve the situation but don't make it perfect. I'm proposing creating a separate issue to track the effort of unifying logic for generating actual configuration sent to Kong Gateway and configuration used only for validation for expression routes. There is test coverage, so it seems to be a safe change.