-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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(router): fix incorrectly calculated priorities in traditional_compat #10615
Conversation
This PR updates the documentation to reflect the change in Kong/kong#10615, which makes traditional_compat mode behave like the traditional router with respect to priorities of routes having multiple paths.
57eb136
to
28e2640
Compare
dd6b078
to
a7b6d07
Compare
This PR updates the documentation to reflect the change in Kong/kong#10615, which makes traditional_compat mode behave like the traditional router with respect to priorities of routes having multiple paths.
)" This reverts commit 7149a59. This documentation update will have to wait until Kong/kong#10615 is merged.
)" (#5442) This reverts commit 7149a59. This documentation update will have to wait until Kong/kong#10615 is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done! I left a few small suggestions, and I'd like to know your thoughts about the table copy comment that I raised.
1b0140a
to
10717c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some early comments.
When prefix and regex routes were mixed or prefixes of different lengths were specified in one route, traditional_compat assigned the highest priority of all paths to the route for all paths, causing unexpected routing matches that were incompatible with the traditional router. With this fix, each multi-path route is split into multiple routes with separate priorities. KAG-727
faf9e8a
to
56cabca
Compare
@bungle can I get a final review and approval, please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…pat (#10615) * fix(router): fix incorrectly calculated priorities in traditional_compat When prefix and regex routes were mixed or prefixes of different lengths were specified in one route, traditional_compat assigned the highest priority of all paths to the route for all paths, causing unexpected routing matches that were incompatible with the traditional router. With this fix, each multi-path route is split into multiple routes with separate priorities. KAG-727 * address review comments * use uuidv5 to create stable split route ids * improve naming * refactor for call-site clarity * some loop refactoring (cherry picked from commit 9beff64)
* fix a mistake introduced by #10615 * adjust order of PRs * remove a comma
Summary
When prefix and regex routes were mixed or prefixes of different lengths were specified in one route, traditional_compat assigned the highest priority of all paths to the route for all paths, causing unexpected routing matches that were incompatible with the traditional router.
With this fix, each multi-path route is split into multiple routes with separate priorities.
Checklist
Issue reference
KAG-727
KAG-1446