Commit 7bb475a8 authored by Furkan Ayhan's avatar Furkan Ayhan

Remove the FF ci_pipeline_add_job_with_lock

It's enabled by default since 14.3

Changelog: other
parent c77e8c13
......@@ -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