Skip to content

Add performance check for group policy deletion

Alexander Turinske requested to merge 474839-add-delete-for-group-level into master

What does this MR do and why?

Add performance check for group policy deletion

  • a user can not delete a policy from the list page
  • there needs to be performance check for scheduled scan execution policies

Changelog: changed

EE: true

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.

Non scan execution policy Scan schedule policy - no performance issues Scan schedule policy - performance issues
non_scan_ex_small scan_ex_-_no_sch_small scan_ex_-_sch_small

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Upload a GitLab Ultimate license
  2. Navigate to a group => Secure => Policies
  3. Either clone this project and link it as the security policy project or create several policies (e.g. non-schedule scan execution policy, schedule scan execution policy, non-scan execution policy)
  4. Either create a lot of projects in your group or copy the patch below into your code
diff --git a/ee/app/assets/javascripts/security_orchestration/components/policy_editor/scan_execution/constants.js b/ee/app/assets/javascripts/security_orchestration/components/policy_editor/scan_execution/constants.js
index 54d6cdd4bcff..a6761c00ab97 100644
--- a/ee/app/assets/javascripts/security_orchestration/components/policy_editor/scan_execution/constants.js
+++ b/ee/app/assets/javascripts/security_orchestration/components/policy_editor/scan_execution/constants.js
@@ -72,4 +72,4 @@ export const ERROR_MESSAGE_MAP = {
   [POLICY_ACTION_BUILDER_DAST_PROFILES_ERROR_KEY]: DAST_SCANNERS_PARSING_ERROR,
 };
 
-export const PROJECTS_COUNT_PERFORMANCE_LIMIT = 1000;
+export const PROJECTS_COUNT_PERFORMANCE_LIMIT = -1;
  1. Verify a user can delete a non-schedule scan execution policy without a modal
  2. Verify a user can delete a non-scan execution policy without a modal
  3. Verify a user can delete a schedule scan execution policy with a modal

Related to #474839 (closed)

Edited by Alexander Turinske

Merge request reports

Loading