Commit 54024a80 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'feature/gb/enable-build-queue-limit' into 'master'

Enable CI/CD builds queue limit by default

See merge request gitlab-org/gitlab!56239
parents 3a5369e1 f1108853
......@@ -10,7 +10,11 @@ module Ci
Result = Struct.new(:build, :build_json, :valid?)
MAX_QUEUE_DEPTH = 50
##
# The queue depth limit number has been determined by observing 95
# percentile of effective queue depth on gitlab.com. This is only likely to
# affect 5% of the worst case scenarios.
MAX_QUEUE_DEPTH = 45
def initialize(runner)
@runner = runner
......@@ -105,7 +109,7 @@ module Ci
builds = builds.queued_before(params[:job_age].seconds.ago)
end
if Feature.enabled?(:ci_register_job_service_one_by_one, runner)
if Feature.enabled?(:ci_register_job_service_one_by_one, runner, default_enabled: true)
build_ids = builds.pluck(:id)
@metrics.observe_queue_size(-> { build_ids.size })
......@@ -171,7 +175,7 @@ module Ci
def max_queue_depth
@max_queue_depth ||= begin
if Feature.enabled?(:gitlab_ci_builds_queue_limit, runner, default_enabled: false)
if Feature.enabled?(:gitlab_ci_builds_queue_limit, runner, default_enabled: true)
MAX_QUEUE_DEPTH
else
::Gitlab::Database::MAX_INT_VALUE
......
......@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/323177
milestone: '13.10'
type: development
group: group::memory
default_enabled: false
default_enabled: true
......@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/323201
milestone: '13.10'
type: development
group: group::continuous integration
default_enabled: false
default_enabled: true
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