fix: make generated VAP deterministic to stop reconcile loop (CP #4640) - #4792
Merged
JaydipGabani merged 1 commit intoAug 27, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Makes generated ValidatingAdmissionPolicies deterministic, preventing unnecessary reconciliation loops.
Changes:
- Sort namespace exemption and exclusion lists.
- Emit CEL operation intersections in canonical order.
- Add deterministic-order regression tests.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
pkg/webhook/namespacelabel.go |
Sorts exempt namespace patterns. |
pkg/webhook/namespacelabel_test.go |
Tests deterministic exemption ordering. |
pkg/drivers/k8scel/transform/make_vap_objects.go |
Canonically orders VAP operations. |
pkg/drivers/k8scel/transform/make_vap_objects_test.go |
Tests canonical operation ordering. |
pkg/controller/config/process/excluder.go |
Sorts excluded namespace patterns. |
pkg/controller/config/process/excluder_test.go |
Tests deterministic exclusion ordering. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-3.23 #4792 +/- ##
===============================================
Coverage ? 44.83%
===============================================
Files ? 284
Lines ? 21045
Branches ? 0
===============================================
Hits ? 9435
Misses ? 10800
Partials ? 810
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…licy-agent#4640) Signed-off-by: Stefan Peer <stefan@peerweb.it> (cherry picked from commit 16ad9db)
abhisheksheth28
force-pushed
the
cherry-pick-4640
branch
from
August 27, 2026 00:06
81f3a13 to
5752487
Compare
JaydipGabani
approved these changes
Aug 27, 2026
JaydipGabani
merged commit Aug 27, 2026
c19d983
into
open-policy-agent:release-3.23
31 of 35 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(cherry picked from commit 16ad9db)
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, using
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when the PR gets merged):Fixes #
Special notes for your reviewer: