Commit 61f5eeaf authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'ci-remove-ci-delete-objects-feature-flags' into 'master'

Remove feature flags for configuring object store files deletion

See merge request gitlab-org/gitlab!79249
parents 0f17f745 9aefd98b
......@@ -22,13 +22,7 @@ module Ci
end
def max_running_jobs
if ::Feature.enabled?(:ci_delete_objects_medium_concurrency)
20
elsif ::Feature.enabled?(:ci_delete_objects_high_concurrency)
50
else
2
end
20
end
private
......
---
name: ci_delete_objects_high_concurrency
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/39464
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/247103
milestone: '13.5'
type: development
group: group::pipeline execution
default_enabled: false
---
name: ci_delete_objects_medium_concurrency
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/39464
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/247103
milestone: '13.5'
type: development
group: group::pipeline execution
default_enabled: false
......@@ -6,15 +6,16 @@ RSpec.describe Ci::DeleteObjectsWorker do
let(:worker) { described_class.new }
it { expect(described_class.idempotent?).to be_truthy }
it { is_expected.to respond_to(:max_running_jobs) }
it { is_expected.to respond_to(:remaining_work_count) }
it { is_expected.to respond_to(:perform_work) }
describe '#perform' do
it 'executes a service' do
allow(worker).to receive(:max_running_jobs).and_return(25)
expect_next_instance_of(Ci::DeleteObjectsService) do |instance|
expect(instance).to receive(:execute)
expect(instance).to receive(:remaining_batches_count)
.with(max_batch_count: 25)
.with(max_batch_count: 20)
.once
.and_call_original
end
......@@ -22,30 +23,4 @@ RSpec.describe Ci::DeleteObjectsWorker do
worker.perform
end
end
describe '#max_running_jobs' do
using RSpec::Parameterized::TableSyntax
before do
stub_feature_flags(
ci_delete_objects_medium_concurrency: medium,
ci_delete_objects_high_concurrency: high
)
end
subject(:max_running_jobs) { worker.max_running_jobs }
where(:medium, :high, :expected) do
false | false | 2
true | false | 20
true | true | 20
false | true | 50
end
with_them do
it 'sets up concurrency depending on the feature flag' do
expect(max_running_jobs).to eq(expected)
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