ROX-37291: Delete ROX_LABEL_BASED_POLICY_SCOPING in ui - #23192
pedrottimark wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
💤 Files with no reviewable changes (2)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe policy scope form now always renders the current inclusion and exclusion cards. The legacy card and its feature flag are removed. ChangesPolicy scope card selection
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to The change consistently exposes the released policy scope cards. No concrete merge-blocking regression was identified; disabling the backend flag would still reject label-based inclusions, consistent with the intentional frontend removal tradeoff. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #23192 +/- ##
==========================================
- Coverage 51.96% 51.92% -0.04%
==========================================
Files 2904 2904
Lines 183013 183013
==========================================
- Hits 95099 95035 -64
- Misses 79595 79639 +44
- Partials 8319 8339 +20
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:
|
🚀 Build Images ReadyImages are ready for commit f0f17e1. To use with deploy scripts: export MAIN_IMAGE_TAG=5.1.x-141-gf0f17e13a9 |
Description
Review: Hide space because of indentation changes
Situation
Feature flag was enabled for 4.11 release on 2026-04-22 in #19987
https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_security_for_kubernetes/4.11/html/release_notes/release-notes-411#policy-scope-cluster-namespace-labels_release-notes-411
It is hard to see how we could hide policy configuration in UI after it has been released, and therefore used in security policies.
Analysis
Find in Files
'ROX_LABEL_BASED_POLICY_SCOPING'Although this contribution will cause mere conflict with contribution to delete
ROX_LEGACY_SCANNER'that might be a feature instead of a bug.While we wait (out of an abundance of caution) to merge the larger contribution, rebase and rerun tests will give even more confidence when its time arrives.
Procedure
https://github.com/stackrox/stackrox/tree/master/ui/apps/platform#delete-a-feature-flag-from-frontend-code
Colleagues can delete from central code at their pace.
User-facing documentation
Testing and quality
Automated testing
How I validated my change
npm run tscin ui/apps/platform folder.npm run lintin ui/apps/platform folder.npm run startin ui/apps/platform folder with staging demo as central.Manual testing
Visit /main/policy-management/policies/?action=create and advance to Resources step
Card for Inclusion and Exclusion has similar format but different options
With and without
isFeatureFlagEnabled('ROX_LABEL_BASED_POLICY_SCOPING')Click Add inclusion and see presence of By label for Cluster amd Namespace

Click Add exclusion and see absence of By label for Cluster and Namespace
