Commit bb253ec5 authored by Marius Bobin's avatar Marius Bobin

Remove decoupling projects-runners feature flags

Changelog: other
parent 831b8720
...@@ -89,11 +89,9 @@ module Ci ...@@ -89,11 +89,9 @@ module Ci
end end
def runner_projects_relation def runner_projects_relation
if ::Feature.enabled?(:ci_pending_builds_project_runners_decoupling, runner, default_enabled: :yaml) runner
runner.runner_projects.select('"ci_runner_projects"."project_id"::bigint') .runner_projects
else .select('"ci_runner_projects"."project_id"::bigint')
runner.projects.without_deleted.with_builds_enabled
end
end end
end end
end end
......
...@@ -269,14 +269,7 @@ module Ci ...@@ -269,14 +269,7 @@ module Ci
{ {
missing_dependency_failure: -> (build, _) { !build.has_valid_build_dependencies? }, missing_dependency_failure: -> (build, _) { !build.has_valid_build_dependencies? },
runner_unsupported: -> (build, params) { !build.supported_runner?(params.dig(:info, :features)) }, runner_unsupported: -> (build, params) { !build.supported_runner?(params.dig(:info, :features)) },
archived_failure: -> (build, _) { build.archived? } archived_failure: -> (build, _) { build.archived? },
}.merge(builds_enabled_checks)
end
def builds_enabled_checks
return {} unless ::Feature.enabled?(:ci_queueing_builds_enabled_checks, runner, default_enabled: :yaml)
{
project_deleted: -> (build, _) { build.project.pending_delete? }, project_deleted: -> (build, _) { build.project.pending_delete? },
builds_disabled: -> (build, _) { !build.project.builds_enabled? } builds_disabled: -> (build, _) { !build.project.builds_enabled? }
} }
......
---
name: ci_pending_builds_project_runners_decoupling
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70415
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/341005
milestone: '14.4'
type: development
group: group::pipeline execution
default_enabled: false
---
name: ci_queueing_builds_enabled_checks
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70581
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/341131
milestone: '14.4'
type: development
group: group::pipeline execution
default_enabled: false
...@@ -87,36 +87,10 @@ module Ci ...@@ -87,36 +87,10 @@ module Ci
end end
context 'for specific runner' do context 'for specific runner' do
context 'with tables decoupling disabled' do it 'does not pick a build' do
before do expect(execute(specific_runner)).to be_nil
stub_feature_flags( expect(pending_job.reload).to be_failed
ci_pending_builds_project_runners_decoupling: false, expect(pending_job.queuing_entry).to be_nil
ci_queueing_builds_enabled_checks: false)
end
around do |example|
allow_cross_joins_across_databases(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/332952') do
example.run
end
end
it 'does not pick a build' do
expect(execute(specific_runner)).to be_nil
end
end
context 'with tables decoupling enabled' do
before do
stub_feature_flags(
ci_pending_builds_project_runners_decoupling: true,
ci_queueing_builds_enabled_checks: true)
end
it 'does not pick a build' do
expect(execute(specific_runner)).to be_nil
expect(pending_job.reload).to be_failed
expect(pending_job.queuing_entry).to be_nil
end
end end
end end
end end
...@@ -272,34 +246,10 @@ module Ci ...@@ -272,34 +246,10 @@ module Ci
context 'and uses project runner' do context 'and uses project runner' do
let(:build) { execute(specific_runner) } let(:build) { execute(specific_runner) }
context 'with tables decoupling disabled' do it 'does not pick a build' do
before do expect(build).to be_nil
stub_feature_flags( expect(pending_job.reload).to be_failed
ci_pending_builds_project_runners_decoupling: false, expect(pending_job.queuing_entry).to be_nil
ci_queueing_builds_enabled_checks: false)
end
around do |example|
allow_cross_joins_across_databases(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/332952') do
example.run
end
end
it { expect(build).to be_nil }
end
context 'with tables decoupling enabled' do
before do
stub_feature_flags(
ci_pending_builds_project_runners_decoupling: true,
ci_queueing_builds_enabled_checks: true)
end
it 'does not pick a build' do
expect(build).to be_nil
expect(pending_job.reload).to be_failed
expect(pending_job.queuing_entry).to be_nil
end
end 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