Commit 3998f302 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'remove-pipelines-in-sidekiq-flag' into 'master'

Remove feature flag for creating pipelines in Sidekiq

See merge request gitlab-org/gitlab!28024
parents c548bbbd a0c47e14
......@@ -6,11 +6,8 @@ module MergeRequests
event_service.open_mr(merge_request, current_user)
notification_service.new_merge_request(merge_request, current_user)
# https://gitlab.com/gitlab-org/gitlab/issues/208813
if ::Feature.enabled?(:create_merge_request_pipelines_in_sidekiq, project)
create_pipeline_for(merge_request, current_user)
merge_request.update_head_pipeline
end
create_pipeline_for(merge_request, current_user)
merge_request.update_head_pipeline
merge_request.diffs(include_stats: false).write_cache
merge_request.create_cross_references!(current_user)
......
......@@ -21,12 +21,6 @@ module MergeRequests
todo_service.new_merge_request(issuable, current_user)
issuable.cache_merge_request_closes_issues!(current_user)
# https://gitlab.com/gitlab-org/gitlab/issues/208813
unless ::Feature.enabled?(:create_merge_request_pipelines_in_sidekiq, project)
create_pipeline_for(issuable, current_user)
issuable.update_head_pipeline
end
Gitlab::UsageDataCounters::MergeRequestCounter.count(:create)
link_lfs_objects(issuable)
......
---
title: Create merge request pipelines in background jobs
merge_request: 28024
author:
type: performance
......@@ -53,19 +53,5 @@ describe MergeRequests::AfterCreateService do
after_create_service.execute(merge_request)
end
# https://gitlab.com/gitlab-org/gitlab/issues/208813
context 'when the create_merge_request_pipelines_in_sidekiq flag is disabled' do
before do
stub_feature_flags(create_merge_request_pipelines_in_sidekiq: false)
end
it 'does not create a pipeline or update the HEAD pipeline' do
expect(after_create_service).not_to receive(:create_pipeline_for)
expect(merge_request).not_to receive(:update_head_pipeline)
after_create_service.execute(merge_request)
end
end
end
end
......@@ -129,22 +129,6 @@ describe MergeRequests::CreateService, :clean_gitlab_redis_shared_state do
end
end
# https://gitlab.com/gitlab-org/gitlab/issues/208813
context 'when the create_merge_request_pipelines_in_sidekiq flag is disabled' do
before do
stub_feature_flags(create_merge_request_pipelines_in_sidekiq: false)
end
it 'creates a pipeline and updates the HEAD pipeline' do
expect(service).to receive(:create_pipeline_for)
expect_next_instance_of(MergeRequest) do |merge_request|
expect(merge_request).to receive(:update_head_pipeline)
end
service.execute
end
end
context 'when head pipelines already exist for merge request source branch', :sidekiq_inline do
let(:shas) { project.repository.commits(opts[:source_branch], limit: 2).map(&:id) }
let!(:pipeline_1) { create(:ci_pipeline, project: project, ref: opts[:source_branch], project_id: project.id, sha: shas[1]) }
......
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