Adds breaking changes icon for policy list
What does this MR do and why?
This MR adds breaking changes icon
If policy has breaking changes warning icon is rendered for all policies with deprecated properties
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Description | UI |
---|---|
Deprecated property | popover.mov |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Enable feature flag:
Feature.enable(:security_policies_breaking_changes)
- Go to project/group
- Go to Secure > Policies
- Click on New policy
- Select Merge request approval policy
- Change to .yaml mode
- Copy the yaml below:
type: approval_policy
name: 'policy'
description: ''
enabled: true
rules:
- type: scan_finding
scanners: []
vulnerabilities_allowed: 0
severity_levels: []
vulnerability_states: [newly_detected]
branch_type: protected
- type: license_finding
match_on_inclusion: true
license_types: []
license_states: []
branch_type: protected
actions:
- type: require_approval
approvals_required: 1
role_approvers:
- developer
-
Click on Configure with a merge request
-
Merge the new MR to add the policy
-
Go back to list, make sure you see the warning icon with popover
-
Update the policy with the content below to remove the deprecated fields :
type: approval_policy name: 'policy' description: '' enabled: true rules: - type: scan_finding scanners: [] vulnerabilities_allowed: 0 severity_levels: [] vulnerability_states: [detected] branch_type: protected - type: license_finding match_on_inclusion_license: true license_types: [] license_states: [] branch_type: protected actions: - type: require_approval approvals_required: 1 role_approvers: - developer
- Go back to list, make sure you see the icon is gone
lated to #448461 (closed)
Edited by Artur Fedorov