Commit 3379e08a authored by Igor Drozdov's avatar Igor Drozdov

Merge branch 'switch_diff_check_with_paths_changed_rpc_flag_on' into 'master'

Switch diff_check_with_paths_changed_rpc_flag flag to default true

See merge request gitlab-org/gitlab!49803
parents d1de867d 178c21b0
---
title: Improve the performance of the diff change access check
merge_request: 49803
author:
type: performance
......@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/288827
milestone: '13.7'
type: development
group: group::code review
default_enabled: false
default_enabled: true
......@@ -58,7 +58,7 @@ module EE
def path_locks_validation
lambda do |diff|
path = if ::Feature.enabled?(:diff_check_with_paths_changed_rpc, project)
path = if ::Feature.enabled?(:diff_check_with_paths_changed_rpc, project, default_enabled: true)
diff.path
else
if diff.renamed_file?
......@@ -82,7 +82,7 @@ module EE
def file_name_validation
lambda do |diff|
if ::Feature.enabled?(:diff_check_with_paths_changed_rpc, project)
if ::Feature.enabled?(:diff_check_with_paths_changed_rpc, project, default_enabled: true)
if new_file?(diff) && denylisted_regex = push_rule.filename_denylisted?(diff.path)
return unless denylisted_regex.present?
......
......@@ -17,7 +17,7 @@ module Gitlab
file_paths = []
if ::Feature.enabled?(:diff_check_with_paths_changed_rpc, project)
if ::Feature.enabled?(:diff_check_with_paths_changed_rpc, project, default_enabled: true)
paths = project.repository.find_changed_paths(commits.map(&:sha))
paths.each do |path|
file_paths.concat([path.path])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment