-
Notifications
You must be signed in to change notification settings - Fork 336
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
In policy matching subset intersect is incorrect #12319
Comments
kuma/pkg/plugins/policies/core/rules/rules.go Lines 198 to 200 in 8659306
This should be |
What's the breaking change risk here? How likely are people to be relying on this behaviour? |
I need to assess it |
@lahabana I did lots of tests and analysis for this, but didn't find an impact on the customer usage side. I also used But, this bug would generate the wrong |
I think the code works as expected. In your example:
these two sets have an intersection
|
This is a little bit confused, in sets |
Why is this contradictory? You need just 1 element that belongs to both s1 and s2 to have an intersection |
Also we have different behaviors once I modified the
|
Actually, you're right, my example here is incorrect. Since there are 3 keys in total (key1, key2 and key3) then the element of the intersection has to be in 3-dimensional space. But I have an example So the issue is correct, I'm going to review the PR. |
What happened?
Went through the Subset Intersect method source codes, I found there's one case would be failed:
In this case, there should not be one intersection but our codes would give us
intersect: true
The text was updated successfully, but these errors were encountered: