Commit 08e5692d authored by Nick Thomas's avatar Nick Thomas

Merge branch '216939-remove-async-mr-check-ff' into 'master'

Remove async_merge_request_check_mergeability feature flag

See merge request gitlab-org/gitlab!33917
parents 0eb4b6f3 fcedf167
......@@ -877,7 +877,7 @@ class MergeRequest < ApplicationRecord
check_service = MergeRequests::MergeabilityCheckService.new(self)
if async && Feature.enabled?(:async_merge_request_check_mergeability, project, default_enabled: true)
if async
check_service.async_execute
else
check_service.execute(retry_lease: false)
......
---
title: Remove async_merge_request_check_mergeability feature flag
merge_request: 33917
author:
type: changed
......@@ -74,8 +74,7 @@ endpoint, set the `with_merge_status_recheck` parameter to `true` in the query.
NOTE: **Note:**
[Starting in GitLab 12.8](https://gitlab.com/gitlab-org/gitlab/-/issues/29984),
when `async_merge_request_check_mergeability` feature flag is enabled, the
mergeability (`merge_status`) of each merge request will be checked
the mergeability (`merge_status`) of each merge request will be checked
asynchronously when a request is made to this endpoint. Poll this API endpoint
to get updated status. This affects the `has_conflicts` property as it is
dependent on the `merge_status`. It'll return `false` unless `merge_status` is
......@@ -555,8 +554,7 @@ Parameters:
NOTE: **Note:**
[Starting in GitLab 12.8](https://gitlab.com/gitlab-org/gitlab/-/issues/29984),
when `async_merge_request_check_mergeability` feature flag is enabled, the
mergeability (`merge_status`) of a merge request will be checked
the mergeability (`merge_status`) of a merge request will be checked
asynchronously when a request is made to this endpoint. Poll this API endpoint
to get updated status. This affects the `has_conflicts` property as it is
dependent on the `merge_status`. It'll return `false` unless `merge_status` is
......
......@@ -2369,24 +2369,10 @@ describe MergeRequest do
end
context 'when async is true' do
context 'and async_merge_request_check_mergeability feature flag is enabled' do
it 'executes MergeabilityCheckService asynchronously' do
expect(mergeability_service).to receive(:async_execute)
it 'executes MergeabilityCheckService asynchronously' do
expect(mergeability_service).to receive(:async_execute)
subject.check_mergeability(async: true)
end
end
context 'and async_merge_request_check_mergeability feature flag is disabled' do
before do
stub_feature_flags(async_merge_request_check_mergeability: false)
end
it 'executes MergeabilityCheckService' do
expect(mergeability_service).to receive(:execute)
subject.check_mergeability(async: true)
end
subject.check_mergeability(async: true)
end
end
end
......
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