-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Kong issue with backend routing in Kong 3.7.1 in Service resources vs 2.8.x. #13393
Comments
router_flavor = traditional_compatible we do not override this field so it stays defaulted to this in our runtimes. |
Some more insights for yall after further testing since last night was a mad dash to fix whatever I could however I could: This test essentially does not pass in real life with functionality on 3.7.1 where on 2.8.x it passes: https://github.com/Kong/kong/blob/master/spec/fixtures/router_path_handling_tests.lua#L91 "path_handling": "v1" on route calling /route path, on 2.8.x series will respect the service resource path trailing slash like "path_handling": "v1" on route calling /route, on 3.7.1 series will NOT respect the service trailing slash like This is breaking behavior for some APIs Kong may proxy to. |
path_handling 'v1' is deprecated since Kong gateway 3.0, the only available value is 'v0', I think that we should find a warning message in the log. |
See change logs of 3.0 and this PR (#9290). |
@chronolaw deprecated is very different from breaking behavior. An application should honor existing functionality even when deprecated. |
Perhaps you could try flavor = traditional, it still supports path_handling='v1'. |
That is a potential option I had considered but there is performance loss with that mode right? And traditional is going away is my understanding hence why we continued with 3.7.x default provided value. And does Kong have a plan to migrate v1 path handlings to v0 when v1 will be moved from deprecated to deleted? Kinda odd Kong is doing reverse versioning there where v0 is preferred but v1 is the deprecated, usually +1 version iterations are the next iteration of a feat. vs considered legacy. And in the future I suppose the field should go away completely if there was only one in the future, shouldn't be configurable maybe in 4.x . I still think this is a pretty glaring issue in between the 2.x to 3.x versions for customers that use Kong. Some of the new routing behaviors of Kong don't seem to make common sense anymore for this issue and the other one I raised. |
Is there an existing issue for this?
Kong version (
$ kong version
)3.7.1
Current Behavior
On Kong 2.8.x we did not observe this. In Kong 3.7.1 we do:
The service resource we have like so:
Route resource like:
Consumed url ends up
gateway.company.com/api/stage/cel/test/tester/v2
Kong 2.8.x would not drop the trailing / when proxying. New Kong 3.7.1 testing it routes to the backside without the / so it tries:
/api/test/moretest/v2.0
when it goes to the backend and it returns 404 now because that trailing slash is relevant to API responses. Would like fixes asap if possible to not drop / on service backend api paths.Backend URL should be myapi.company.com/api/test/moretest/v2.0/
Kong routes to: myapi.company.com/api/test/moretest/v2.0
Expected Behavior
Kong should not drop service path values from a configured resource on proxying. If the service path ends on a
/
Kong should be respecting that/
, certainly when using path handling v1 as the unit tests and docs say it will.Steps To Reproduce
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: