-
Notifications
You must be signed in to change notification settings - Fork 211
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 FilterSpecByPathsWithoutSideEffects to handle cases without slash #495
Comments
Is this something you want? If so I'll open a PR. +++ prefixSet := sets.NewString(keepPathPrefixes...)
for path, pathItem := range sp.Paths.Paths {
if !prefixes.HasPrefix(path) {
continue
}
+++ if !strings.HasSuffix(path, "/") {
+++ continue
+++ }
+++ if !prefixSet.Has(path) {
+++ continue
+++ }
ret.Paths.Paths[path] = pathItem
} |
From a quick glance I don't think it's correct but seems close. Here's a useful test case
|
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
I saw this issue is rotten, so I'm trying to give it a go: #520. First time opening a PR, please let me know if I missed anything. |
The current FilterSpecByPathsWithoutSideEffects behavior is wrong for paths without a trailing slash. See comment thread for more details: https://github.com/kubernetes/kubernetes/pull/123770/files#r1516319191
cc @liggitt
The text was updated successfully, but these errors were encountered: