Commit ee988aaa authored by Max Woolf's avatar Max Woolf

Merge branch 'remove-use_cte_for_any_project_with_shared_runners_enabled' into 'master'

Remove shared runners CTE FF

See merge request gitlab-org/gitlab!72370
parents cd170f47 b47f6a62
---
name: use_cte_for_any_project_with_shared_runners_enabled
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/71452
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/342024
milestone: '14.4'
type: development
group: group::optimize
default_enabled: true
......@@ -430,7 +430,6 @@ module EE
private
def any_project_with_shared_runners_enabled_with_cte?
if ::Feature.enabled?(:use_cte_for_any_project_with_shared_runners_enabled, self, default_enabled: :yaml)
projects_query = if user_namespace?
projects
else
......@@ -443,9 +442,6 @@ module EE
end
projects_query.with_shared_runners.any?
else
all_projects.with_shared_runners.any?
end
end
def fallback_plan
......
......@@ -627,7 +627,6 @@ RSpec.describe Namespace do
describe '#any_project_with_shared_runners_enabled?' do
subject { namespace.any_project_with_shared_runners_enabled? }
shared_examples '#any_project_with_shared_runners_enabled? examples' do
context 'without projects' do
it { is_expected.to be_falsey }
end
......@@ -657,31 +656,6 @@ RSpec.describe Namespace do
end
end
context 'when use_cte_for_any_project_with_shared_runners_enabled is enabled' do
before do
stub_feature_flags(use_cte_for_any_project_with_shared_runners_enabled: true)
end
it_behaves_like '#any_project_with_shared_runners_enabled? examples' do
it 'creates a CTE' do
group = create(:group)
expect(Gitlab::SQL::CTE).to receive(:new).and_call_original
group.any_project_with_shared_runners_enabled?
end
end
end
context 'when use_cte_for_any_project_with_shared_runners_enabled is disabled' do
before do
stub_feature_flags(use_cte_for_any_project_with_shared_runners_enabled: false)
end
it_behaves_like '#any_project_with_shared_runners_enabled? examples'
end
end
describe '#new_monthly_ci_minutes_enabled?' do
subject { namespace.new_monthly_ci_minutes_enabled? }
......
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