Commit c1bdacec authored by Andy Soiron's avatar Andy Soiron

Merge branch '337628-remove-ci_pipeline_add_job_with_lock' into 'master'

Remove the FF ci_pipeline_add_job_with_lock

See merge request gitlab-org/gitlab!71652
parents c4b86134 7bb475a8
......@@ -16,15 +16,7 @@ module Ci
def execute!(job, &block)
assign_pipeline_attributes(job)
if Feature.enabled?(:ci_pipeline_add_job_with_lock, pipeline.project, default_enabled: :yaml)
in_lock("ci:pipelines:#{pipeline.id}:add-job", ttl: LOCK_TIMEOUT, sleep_sec: LOCK_SLEEP, retries: LOCK_RETRIES) do
Ci::Pipeline.transaction do
yield(job)
job.update_older_statuses_retried!
end
end
else
in_lock("ci:pipelines:#{pipeline.id}:add-job", ttl: LOCK_TIMEOUT, sleep_sec: LOCK_SLEEP, retries: LOCK_RETRIES) do
Ci::Pipeline.transaction do
yield(job)
......
---
name: ci_pipeline_add_job_with_lock
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/65754
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/337628
milestone: '14.2'
type: development
group: group::pipeline authoring
default_enabled: true
......@@ -77,19 +77,6 @@ RSpec.describe Ci::Pipelines::AddJobService do
expect(execute).to be_success
expect(execute.payload[:job]).to eq(job)
end
context 'when the FF ci_pipeline_add_job_with_lock is disabled' do
before do
stub_feature_flags(ci_pipeline_add_job_with_lock: false)
end
it 'does not use exclusive lock' do
expect(Gitlab::ExclusiveLease).not_to receive(:new).with(lock_key, timeout: lock_timeout)
expect(execute).to be_success
expect(execute.payload[:job]).to eq(job)
end
end
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