Replace api.Rule with types.PolicyEntry#40213
Conversation
e7a6663 to
442a26f
Compare
|
/ci-e2e-upgrade |
1 similar comment
|
/ci-e2e-upgrade |
|
/ci-kpr |
joestringer
left a comment
There was a problem hiding this comment.
There's a couple of minor things that seem out of place but otherwise it seems like this is almost ready to merge.
|
Why are the tests failing? Please triage. |
For ci-ginkgo: #41254 |
|
/test |
That issue is marked as duplicate of #41194, which was fixed on August 18 via #41234. If you're now observing the same symptoms then either that issue was not fixed, or there's a new issue with the same symptoms. Sounds like we need to either reopen or file a fresh issue for this, otherwise we will continue to ignore it. Given that the same test seemed to fail on Sept 30 as well (per #40213 (comment)), this seems to be recurring. Are we sure this is affecting the But wait, the latest failure isn't even failing in the same test as that issue. The symptoms seem different. I'll re-run the tests to get a better view into whether the tests are reliably failing or not. |
joestringer
left a comment
There was a problem hiding this comment.
The changes look good. I wonder whether we may be missing some optimizations with the aggregatedSelectors stuff being removed, but it is definitely a cleanup. This should also address a long-running tech debt issue #8353 🎉
Last blocker is whether this PR introduces failures in the testsuite. Let's see how the testing results come out.
|
/test |
|
Commit 42347d5 does not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
|
The following ci-integration test flakiness is caused by this PR: The ordering of L7 rules within PerSelectorPolicy becomes non-deterministic. The current Equal method insists that the order of HTTP rules (and DNS, L7 and Kafka rules, too) match exactly, which is not necessary. I have added a commit that changes the DeepEqual for L7Rule so that the order of HTTP, FQDN and L7 rules does not matter. I am not changing the DeepEqual for Kafka rules, as they are not causing test flakiness right now, Kafka rules are marked as deprecated and fixing it would require changes to an external package. |
|
/test |
|
ci-clustermesh failure looks to be the same as this ci-ginkgo failure: #42125 The key part being: |
|
/test |
1 similar comment
|
/test |
Signed-off-by: Blaz Zupan <[email protected]>
Signed-off-by: Blaz Zupan <[email protected]>
Signed-off-by: Blaz Zupan <[email protected]>
Signed-off-by: Blaz Zupan <[email protected]>
The recent policy engine refactor introduced non-deterministic ordering of L7Rules within the PerSelectorPolicy struct. This causes test flakiness because the `Equal` method's use of `DeepEqual` is order-sensitive when comparing slices. To stabilize the comparison, this commit uses `deepequal-gen` annotations to generate a custom `DeepEqual` method that compares L7Rules slices without regard to order. New slice types were introduced for this purpose, as the annotation cannot be applied directly to struct fields. **Scope:** The Kafka slice is intentionally excluded from this change. Kafka rules are deprecated, and modifying them would require changes to an external package. No test flakiness has been observed for these rules. Signed-off-by: Blaz Zupan <[email protected]>
|
/test |
|
/ci-ginkgo |
1 similar comment
|
/ci-ginkgo |
|
The more times we run I retriggered the target job for the third time just now at this link: https://github.com/cilium/cilium/actions/runs/18501946770 . |
|
Thanks for your patience and efforts on this @TheBeeZee ! |
Refactor policy engine to use PolicyEntry as the internal representation of policies, as described in CFP-39646.
Fixes: #40015