Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-10-03 18:09:32 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-10-03 18:09:32 +0300
commit28bc8eafd30e83c5ff27a50caa2c6e82586acf77 (patch)
tree0ebd89b583757a32d9ff803a10e3dffe3179497d
parent265dc26fedd34371e11c06fa7f8bcdbc273f50b5 (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/models/ci/bridge.rb6
-rw-r--r--config/feature_flags/development/create_cross_project_pipeline_worker_rename.yml8
-rw-r--r--spec/models/ci/bridge_spec.rb54
-rw-r--r--spec/services/ci/play_bridge_service_spec.rb24
4 files changed, 11 insertions, 81 deletions
diff --git a/app/models/ci/bridge.rb b/app/models/ci/bridge.rb
index 29bedd07a55..50bda64d537 100644
--- a/app/models/ci/bridge.rb
+++ b/app/models/ci/bridge.rb
@@ -31,11 +31,7 @@ module Ci
next unless bridge.triggers_downstream_pipeline?
bridge.run_after_commit do
- if ::Feature.enabled?(:create_cross_project_pipeline_worker_rename, default_enabled: :yaml)
- ::Ci::CreateDownstreamPipelineWorker.perform_async(bridge.id)
- else
- ::Ci::CreateCrossProjectPipelineWorker.perform_async(bridge.id)
- end
+ ::Ci::CreateDownstreamPipelineWorker.perform_async(bridge.id)
end
end
diff --git a/config/feature_flags/development/create_cross_project_pipeline_worker_rename.yml b/config/feature_flags/development/create_cross_project_pipeline_worker_rename.yml
deleted file mode 100644
index c9df20e93b5..00000000000
--- a/config/feature_flags/development/create_cross_project_pipeline_worker_rename.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-name: create_cross_project_pipeline_worker_rename
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70816
-rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/341410
-milestone: '14.4'
-type: development
-group: group::pipeline authoring
-default_enabled: false
diff --git a/spec/models/ci/bridge_spec.rb b/spec/models/ci/bridge_spec.rb
index 1dfd5084954..8f1ae9c5f02 100644
--- a/spec/models/ci/bridge_spec.rb
+++ b/spec/models/ci/bridge_spec.rb
@@ -73,61 +73,21 @@ RSpec.describe Ci::Bridge do
describe 'state machine transitions' do
context 'when bridge points towards downstream' do
%i[created manual].each do |status|
- context 'when the create_cross_project_pipeline_worker_rename feature is enabled' do
- before do
- stub_feature_flags(create_cross_project_pipeline_worker_rename: true)
- end
-
- it "schedules downstream pipeline creation when the status is #{status}" do
- bridge.status = status
-
- bridge.enqueue!
-
- expect(::Ci::CreateDownstreamPipelineWorker.jobs.last['args']).to eq([bridge.id])
- end
- end
-
- context 'when the create_cross_project_pipeline_worker_rename feature is not enabled' do
- before do
- stub_feature_flags(create_cross_project_pipeline_worker_rename: false)
- end
-
- it "schedules downstream pipeline creation when the status is #{status}" do
- bridge.status = status
-
- bridge.enqueue!
+ it "schedules downstream pipeline creation when the status is #{status}" do
+ bridge.status = status
- expect(::Ci::CreateCrossProjectPipelineWorker.jobs.last['args']).to eq([bridge.id])
- end
- end
- end
-
- context 'when the create_cross_project_pipeline_worker_rename feature is enabled' do
- before do
- stub_feature_flags(create_cross_project_pipeline_worker_rename: true)
- end
-
- it "schedules downstream pipeline creation when the status is waiting for resource" do
- bridge.status = :waiting_for_resource
-
- bridge.enqueue_waiting_for_resource!
+ bridge.enqueue!
expect(::Ci::CreateDownstreamPipelineWorker.jobs.last['args']).to eq([bridge.id])
end
end
- context 'when the create_cross_project_pipeline_worker_rename feature is not enabled' do
- before do
- stub_feature_flags(create_cross_project_pipeline_worker_rename: false)
- end
+ it "schedules downstream pipeline creation when the status is waiting for resource" do
+ bridge.status = :waiting_for_resource
- it "schedules downstream pipeline creation when the status is waiting for resource" do
- bridge.status = :waiting_for_resource
+ bridge.enqueue_waiting_for_resource!
- bridge.enqueue_waiting_for_resource!
-
- expect(::Ci::CreateCrossProjectPipelineWorker.jobs.last['args']).to eq([bridge.id])
- end
+ expect(::Ci::CreateDownstreamPipelineWorker.jobs.last['args']).to match_array([bridge.id])
end
it 'raises error when the status is failed' do
diff --git a/spec/services/ci/play_bridge_service_spec.rb b/spec/services/ci/play_bridge_service_spec.rb
index 665f25de299..56b1615a56d 100644
--- a/spec/services/ci/play_bridge_service_spec.rb
+++ b/spec/services/ci/play_bridge_service_spec.rb
@@ -29,28 +29,10 @@ RSpec.describe Ci::PlayBridgeService, '#execute' do
expect(bridge.reload.user).to eq(user)
end
- context 'when the create_cross_project_pipeline_worker_rename feature is enabled' do
- before do
- stub_feature_flags(create_cross_project_pipeline_worker_rename: true)
- end
-
- it 'enqueues Ci::CreateDownstreamPipelineWorker' do
- expect(::Ci::CreateDownstreamPipelineWorker).to receive(:perform_async).with(bridge.id)
-
- execute_service
- end
- end
+ it 'enqueues Ci::CreateDownstreamPipelineWorker' do
+ expect(::Ci::CreateDownstreamPipelineWorker).to receive(:perform_async).with(bridge.id)
- context 'when the create_cross_project_pipeline_worker_rename feature is not enabled' do
- before do
- stub_feature_flags(create_cross_project_pipeline_worker_rename: false)
- end
-
- it 'enqueues Ci::CreateCrossProjectPipelineWorker' do
- expect(::Ci::CreateCrossProjectPipelineWorker).to receive(:perform_async).with(bridge.id)
-
- execute_service
- end
+ execute_service
end
context 'when a subsequent job is skipped' do