Commit f48bd763 authored by James Fargher's avatar James Fargher

Merge branch 'remove-ff-ci_use_merge_request_ref' into 'master'

Remove FF ci_use_merge_request_ref

See merge request gitlab-org/gitlab!30596
parents d154f922 88c7d484
...@@ -89,8 +89,7 @@ module MergeRequests ...@@ -89,8 +89,7 @@ module MergeRequests
end end
def can_use_merge_request_ref?(merge_request) def can_use_merge_request_ref?(merge_request)
Feature.enabled?(:ci_use_merge_request_ref, project, default_enabled: true) && !merge_request.for_fork?
!merge_request.for_fork?
end end
def abort_auto_merge(merge_request, reason) def abort_auto_merge(merge_request, reason)
......
...@@ -93,7 +93,6 @@ canceled. ...@@ -93,7 +93,6 @@ canceled.
Can be caused by some disabled feature flags. Please make sure that Can be caused by some disabled feature flags. Please make sure that
the following feature flags are enabled on your GitLab instance: the following feature flags are enabled on your GitLab instance:
- `:ci_use_merge_request_ref`
- `:merge_ref_auto_sync` - `:merge_ref_auto_sync`
To check and set these feature flag values, please ask an administrator to: To check and set these feature flag values, please ask an administrator to:
...@@ -107,14 +106,12 @@ To check and set these feature flag values, please ask an administrator to: ...@@ -107,14 +106,12 @@ To check and set these feature flag values, please ask an administrator to:
1. Check if the flags are enabled or not: 1. Check if the flags are enabled or not:
```ruby ```ruby
Feature.enabled?(:ci_use_merge_request_ref)
Feature.enabled?(:merge_ref_auto_sync) Feature.enabled?(:merge_ref_auto_sync)
``` ```
1. If needed, enable the feature flags: 1. If needed, enable the feature flags:
```ruby ```ruby
Feature.enable(:ci_use_merge_request_ref)
Feature.enable(:merge_ref_auto_sync) Feature.enable(:merge_ref_auto_sync)
``` ```
......
...@@ -76,14 +76,6 @@ describe MergeRequests::CreatePipelineService, :clean_gitlab_redis_shared_state ...@@ -76,14 +76,6 @@ describe MergeRequests::CreatePipelineService, :clean_gitlab_redis_shared_state
it_behaves_like 'detached merge request pipeline' it_behaves_like 'detached merge request pipeline'
end end
context 'when ci_use_merge_request_ref feature flag is disabled' do
before do
stub_feature_flags(ci_use_merge_request_ref: false)
end
it_behaves_like 'detached merge request pipeline'
end
context 'when merge request is submitted from fork' do context 'when merge request is submitted from fork' do
let(:source_project) { fork_project(project, nil, repository: true) } let(:source_project) { fork_project(project, nil, repository: true) }
......
...@@ -224,19 +224,6 @@ describe MergeRequests::CreateService, :clean_gitlab_redis_shared_state do ...@@ -224,19 +224,6 @@ describe MergeRequests::CreateService, :clean_gitlab_redis_shared_state do
end end
end end
context 'when ci_use_merge_request_ref feature flag is false' do
before do
stub_feature_flags(ci_use_merge_request_ref: false)
end
it 'create legacy detached merge request pipeline for non-fork merge request' do
merge_request.reload
expect(merge_request.actual_head_pipeline)
.to be_legacy_detached_merge_request_pipeline
end
end
context 'when there are no commits between source branch and target branch' do context 'when there are no commits between source branch and target branch' do
let(:opts) do let(:opts) do
{ {
......
...@@ -209,19 +209,6 @@ describe MergeRequests::RefreshService do ...@@ -209,19 +209,6 @@ describe MergeRequests::RefreshService do
end end
end end
context 'when ci_use_merge_request_ref feature flag is false' do
before do
stub_feature_flags(ci_use_merge_request_ref: false)
end
it 'create legacy detached merge request pipeline for non-fork merge request' do
subject
expect(@merge_request.pipelines_for_merge_request.first)
.to be_legacy_detached_merge_request_pipeline
end
end
context "when branch pipeline was created before a detaced merge request pipeline has been created" do context "when branch pipeline was created before a detaced merge request pipeline has been created" do
before do before do
create(:ci_pipeline, project: @merge_request.source_project, create(:ci_pipeline, project: @merge_request.source_project,
......
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