Skip to content

fix: make generated VAP deterministic to stop reconcile loop (CP #4640) - #4792

Merged
JaydipGabani merged 1 commit into
open-policy-agent:release-3.23from
abhisheksheth28:cherry-pick-4640
Aug 27, 2026
Merged

fix: make generated VAP deterministic to stop reconcile loop (CP #4640)#4792
JaydipGabani merged 1 commit into
open-policy-agent:release-3.23from
abhisheksheth28:cherry-pick-4640

Conversation

@abhisheksheth28

Copy link
Copy Markdown
Contributor

(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:

@abhisheksheth28
abhisheksheth28 requested a review from a team as a code owner August 26, 2026 23:53
Copilot AI balanced review requested due to automatic review settings August 26, 2026 23:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-commenter

codecov-commenter commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release-3.23@09a99a0). Learn more about missing BASE report.

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           
Flag Coverage Δ
unittests 44.83% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…licy-agent#4640)

Signed-off-by: Stefan Peer <stefan@peerweb.it>
(cherry picked from commit 16ad9db)
Copilot AI review requested due to automatic review settings August 27, 2026 00:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

@JaydipGabani
JaydipGabani merged commit c19d983 into open-policy-agent:release-3.23 Aug 27, 2026
31 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants