-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fixed validation for VSR exact & regex subroutes #4744
Conversation
Thank you @jo-carter for your PR! Could you please add some unit test cases for the validation failures? |
👷 Deploy request for nginx-kubernetes-ingress pending review.Visit the deploys page to approve it
|
@haywoodsh Sure, I've added a couple of unit tests. |
@jo-carter this change removes the capability of using regex or exact matches altogether |
Since a VSR may only contain a single subroute when using exact or regex matching skipping route validation here is incorrect. Correctly configured VSRs for regex or exact will be validated (and terminate) earlier in function, ie. where VS path is regex + only 1 subroute + subroute syntax check passes.
Signed-off-by: Haywood Shannon <5781935+haywoodsh@users.noreply.github.com>
Signed-off-by: Haywood Shannon <5781935+haywoodsh@users.noreply.github.com>
@haywoodsh Do we need to squash / amend any of these commits ? They undo each other in places (the unit tests). |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4744 +/- ##
==========================================
+ Coverage 52.32% 52.35% +0.02%
==========================================
Files 61 61
Lines 17502 17505 +3
==========================================
+ Hits 9158 9164 +6
+ Misses 8015 8012 -3
Partials 329 329 ☔ View full report in Codecov by Sentry. |
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 for docs changes: not approving as most of the PR content is code-based.
* Fixed validation for VSR exact & regex subroutes Since a VSR may only contain a single subroute when using exact or regex matching skipping route validation here is incorrect. Correctly configured VSRs for regex or exact will be validated (and terminate) earlier in function, ie. where VS path is regex + only 1 subroute + subroute syntax check passes. * Added Unit Tests * Fix validation Signed-off-by: Haywood Shannon <5781935+haywoodsh@users.noreply.github.com> * Add unit tests and update docs Signed-off-by: Haywood Shannon <5781935+haywoodsh@users.noreply.github.com> * Adjusted Unit test messages. --------- Signed-off-by: Haywood Shannon <5781935+haywoodsh@users.noreply.github.com> Co-authored-by: Haywood Shannon <5781935+haywoodsh@users.noreply.github.com> Co-authored-by: Venktesh Shivam Patel <ve.patel@f5.com>
Since a VSR may only contain a single subroute when using exact or regex matching skipping route validation here is incorrect.
Correctly configured VSRs for regex or exact will be validated (and terminate) earlier in function, ie. where VS path is regex + only 1 subroute + subroute syntax check passes.
Resolves ticket 4727
Checklist
Before creating a PR, run through this checklist and mark each as complete.