Commit 1fb66ed6 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'ci-remove-optional-queuing-flags' into 'master'

Remove decoupling projects-runners feature flags

See merge request gitlab-org/gitlab!75422
parents beee1db2 bb253ec5
...@@ -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,31 +87,6 @@ module Ci ...@@ -87,31 +87,6 @@ module Ci
end end
context 'for specific runner' do context 'for specific runner' do
context 'with tables decoupling disabled' do
before do
stub_feature_flags(
ci_pending_builds_project_runners_decoupling: false,
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 it 'does not pick a build' do
expect(execute(specific_runner)).to be_nil expect(execute(specific_runner)).to be_nil
expect(pending_job.reload).to be_failed expect(pending_job.reload).to be_failed
...@@ -119,7 +94,6 @@ module Ci ...@@ -119,7 +94,6 @@ module Ci
end end
end end
end end
end
context 'allow shared runners' do context 'allow shared runners' do
before do before do
...@@ -272,29 +246,6 @@ module Ci ...@@ -272,29 +246,6 @@ 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
before do
stub_feature_flags(
ci_pending_builds_project_runners_decoupling: false,
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 it 'does not pick a build' do
expect(build).to be_nil expect(build).to be_nil
expect(pending_job.reload).to be_failed expect(pending_job.reload).to be_failed
...@@ -302,7 +253,6 @@ module Ci ...@@ -302,7 +253,6 @@ module Ci
end end
end end
end end
end
context 'allow group runners' do context 'allow group runners' do
before do before do
......
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