Skip to content

ROX-33090: Align policy exclusions with inclusions#19848

Open
bradr5 wants to merge 2 commits intomasterfrom
bradr/ROX-33090_align_exclusions_card_with_inclusions
Open

ROX-33090: Align policy exclusions with inclusions#19848
bradr5 wants to merge 2 commits intomasterfrom
bradr/ROX-33090_align_exclusions_card_with_inclusions

Conversation

@bradr5
Copy link
Copy Markdown
Contributor

@bradr5 bradr5 commented Apr 6, 2026

Description

Adds a dedicated exclusion scope card in the policy wizard (when not on the legacy label based scoping path) and lines it up with the inclusion scope UX.

  • Shared model: Exclusion rows use the same PolicyScope shape as inclusions (same backend storage.Scope), aligning with the backend proto. While the backend currently ignores cluster and namespace labels for exclusions, those fields still exist in the proto and are shared across inclusion and exclusion scopes.
  • Save / dryrun: Empty scope objects are normalized to scope: null when building server exclusions. This also addresses a long standing edge case bug where clearing fields after typing could fail Central validation due to a non-null scope.
  • Labels: Whitespace only or empty key+value labels are normalized to null before send
  • Layout: Removed a utility class on the cluster control in favor of flex so the cluster dropdown can span the full width of the card.

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

Inclusions:
Screenshot 2026-04-07 at 11 15 48 AM


Exclusions:
Screenshot 2026-04-07 at 11 15 51 AM

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 6, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

🚀 Build Images Ready

Images are ready for commit a04c76d. To use with deploy scripts:

export MAIN_IMAGE_TAG=4.11.x-568-ga04c76d32c

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

🚀 Build Images Ready

Images are ready for commit 8db31fb. To use with deploy scripts:

export MAIN_IMAGE_TAG=4.11.x-567-g8db31fb532

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.59%. Comparing base (a3cad00) to head (a04c76d).
⚠️ Report is 18 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #19848      +/-   ##
==========================================
- Coverage   49.60%   49.59%   -0.02%     
==========================================
  Files        2763     2766       +3     
  Lines      208339   208530     +191     
==========================================
+ Hits       103344   103412      +68     
- Misses      97331    97447     +116     
- Partials     7664     7671       +7     
Flag Coverage Δ
go-unit-tests 49.59% <ø> (-0.02%) ⬇️

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

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bradr5 bradr5 marked this pull request as ready for review April 7, 2026 16:16
@bradr5 bradr5 requested a review from a team as a code owner April 7, 2026 16:16
@bradr5 bradr5 requested a review from pedrottimark April 7, 2026 16:17
Copy link
Copy Markdown
Contributor

@pedrottimark pedrottimark left a comment

Choose a reason for hiding this comment

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

These changes build on your previous contributions so that business logic and conditional rendering are much clearer to review than I remember from time past.

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 7, 2026

@bradr5: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/ocp-4-21-ui-e2e-tests a04c76d link false /test ocp-4-21-ui-e2e-tests

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants