Update feature flag structure for policy settings
What does this MR do and why?
Consolidate feature flags
- remove :scan_result_policy_settings feature flag
- use :scan_result_policies_block_unprotecting_branches in its place
- decouple :scan_result_any_merge_request feature flag from :scan_result_policies_block_unprotecting_branches
- update util methods to use gon instead of glFeatures
- update tests
Changelog: removed
EE: true
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Global search | Proof of removal |
---|---|
scan_result_policy_settings |
![]() |
scanResultPolicySettings |
![]() |
Old description before I thought better of it
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Upload a GitLab Ultimate license
- Navigate to a project/group => Secure => Policies => New policy => Scan Result Policy
- Toggle feature flags like in the options above
echo "Feature.disable(:scan_result_policy_settings) && Feature.enable(:scan_result_policies_block_unprotecting_branches) && Feature.enable(:scan_result_any_merge_request)" | rails c
- Verify the policy editor with expected field above
- Navigate to yaml mode, change a setting, navigate back
- Verify the rule mode has updated and is not disabled
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #421623 (closed)
Edited by Alexander Turinske