Skip to content

Adds breaking changes icon for policy list

Artur Fedorov requested to merge 448461-policies-depricated-icon into master

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)
  1. Go to project/group
  2. Go to Secure > Policies
  3. Click on New policy
  4. Select Merge request approval policy
  5. Change to .yaml mode
  6. 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
  1. Click on Configure with a merge request

  2. Merge the new MR to add the policy

  3. Go back to list, make sure you see the warning icon with popover

  4. 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
    
    1. Go back to list, make sure you see the icon is gone

lated to #448461 (closed)

Edited by Artur Fedorov

Merge request reports

Loading