From 812778d0f9d137f04279018855cb38ea88eb13a4 Mon Sep 17 00:00:00 2001 From: Alexander Turinske Date: Wed, 17 Sep 2025 22:05:45 -0600 Subject: [PATCH 1/4] Remove flexible_scan_execution_policy feature flag - remove all usage - update tests Changelog: changed EE: true --- .../components/policy_editor/constants.js | 5 +- .../scan_execution/editor_component.vue | 74 +-- .../policy_editor/scan_execution/lib/index.js | 62 +-- .../rule/base_rule_component.vue | 14 +- .../groups/security/policies_controller.rb | 1 - .../projects/security/policies_controller.rb | 1 - .../policy_editor/constants_spec.js | 130 ++--- .../scan_execution/editor_component_spec.js | 499 ++++++------------ .../scan_execution/lib/actions_spec.js | 12 +- .../scan_execution/lib/index_spec.js | 45 +- .../rule/base_rule_component_spec.js | 20 - .../security_orchestration/mocks/mock_data.js | 13 +- .../mocks/mock_scan_execution_policy_data.js | 40 ++ locale/gitlab.pot | 3 - 14 files changed, 281 insertions(+), 638 deletions(-) diff --git a/ee/app/assets/javascripts/security_orchestration/components/policy_editor/constants.js b/ee/app/assets/javascripts/security_orchestration/components/policy_editor/constants.js index 4ed64d576e63a4..7f04a4fe8d4ad1 100644 --- a/ee/app/assets/javascripts/security_orchestration/components/policy_editor/constants.js +++ b/ee/app/assets/javascripts/security_orchestration/components/policy_editor/constants.js @@ -217,9 +217,8 @@ export const SCAN_EXECUTION_BRANCH_TYPE_OPTIONS = ({ SPECIFIC_BRANCHES, ]; - // Feature flag dependent options - if (window.gon?.features?.flexibleScanExecutionPolicy && includeTargetTypes) { - // Additional options when feature flag is enabled + // Additional options when it is a pipeline scan + if (includeTargetTypes) { const additionalOptions = [ TARGET_PROTECTED_BRANCHES, isGroupNamespace ? GROUP_TARGET_DEFAULT_BRANCHES : PROJECT_TARGET_DEFAULT_BRANCH, diff --git a/ee/app/assets/javascripts/security_orchestration/components/policy_editor/scan_execution/editor_component.vue b/ee/app/assets/javascripts/security_orchestration/components/policy_editor/scan_execution/editor_component.vue index 8b27ce603e18ab..22e0a4e9739630 100644 --- a/ee/app/assets/javascripts/security_orchestration/components/policy_editor/scan_execution/editor_component.vue +++ b/ee/app/assets/javascripts/security_orchestration/components/policy_editor/scan_execution/editor_component.vue @@ -203,9 +203,6 @@ export default { isDefaultConfig() { return this.configType === SELECTION_CONFIG_DEFAULT; }, - hasFlexibleScanExecutionPolicy() { - return this.glFeatures.flexibleScanExecutionPolicy; - }, hasNewSplitView() { return this.glFeatures.securityPoliciesSplitView; }, @@ -390,77 +387,8 @@ export default { @update-yaml="updateYaml" @update-editor-mode="changeEditorMode" > - - - -