Commit b53afe12 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'kerrizor/remove-merge_ref_auto_sync_lock-feature-flag' into 'master'

Remove merge_reg_auto_sync_lock feature flag

See merge request gitlab-org/gitlab!51746
parents 4483e4ef a362b57c
...@@ -38,7 +38,6 @@ module MergeRequests ...@@ -38,7 +38,6 @@ module MergeRequests
# error otherwise. # error otherwise.
def execute(recheck: false, retry_lease: true) def execute(recheck: false, retry_lease: true)
return service_error if service_error return service_error if service_error
return check_mergeability(recheck) unless merge_ref_auto_sync_lock_enabled?
in_write_lock(retry_lease: retry_lease) do |retried| in_write_lock(retry_lease: retry_lease) do |retried|
# When multiple calls are waiting for the same lock (retry_lease), # When multiple calls are waiting for the same lock (retry_lease),
...@@ -157,10 +156,6 @@ module MergeRequests ...@@ -157,10 +156,6 @@ module MergeRequests
result[:status] == :success result[:status] == :success
end end
def merge_ref_auto_sync_lock_enabled?
Feature.enabled?(:merge_ref_auto_sync_lock, project, default_enabled: true)
end
def service_error def service_error
strong_memoize(:service_error) do strong_memoize(:service_error) do
if !merge_request if !merge_request
......
---
name: merge_ref_auto_sync_lock
introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/31082
rollout_issue_url:
milestone: '12.2'
type: development
group: group::code review
default_enabled: true
...@@ -124,14 +124,6 @@ RSpec.describe MergeRequests::MergeabilityCheckService, :clean_gitlab_redis_shar ...@@ -124,14 +124,6 @@ RSpec.describe MergeRequests::MergeabilityCheckService, :clean_gitlab_redis_shar
it_behaves_like 'mergeable merge request' it_behaves_like 'mergeable merge request'
context 'when lock is disabled' do
before do
stub_feature_flags(merge_ref_auto_sync_lock: false)
end
it_behaves_like 'mergeable merge request'
end
context 'when concurrent calls' do context 'when concurrent calls' do
it 'waits first lock and returns "cached" result in subsequent calls' do it 'waits first lock and returns "cached" result in subsequent calls' do
threads = execute_within_threads(amount: 3) threads = execute_within_threads(amount: 3)
......
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