Skip to content
代码片段 群组 项目
提交 c14b941c 编辑于 作者: Vitali Tatarintev's avatar Vitali Tatarintev
浏览文件

Merge branch '324373-expire-pipeline-cache-worker-lb' into 'master'

Enable load balancing in ExpirePipelineCacheWorker [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!62073
No related branches found
No related tags found
无相关合并请求
...@@ -1428,7 +1428,7 @@ ...@@ -1428,7 +1428,7 @@
:urgency: :high :urgency: :high
:resource_boundary: :cpu :resource_boundary: :cpu
:weight: 3 :weight: 3
:idempotent: true :idempotent:
:tags: [] :tags: []
- :name: pipeline_creation:create_pipeline - :name: pipeline_creation:create_pipeline
:worker_name: CreatePipelineWorker :worker_name: CreatePipelineWorker
......
# frozen_string_literal: true # frozen_string_literal: true
# rubocop: disable Scalability/IdempotentWorker
class ExpirePipelineCacheWorker class ExpirePipelineCacheWorker
include ApplicationWorker include ApplicationWorker
...@@ -9,8 +10,12 @@ class ExpirePipelineCacheWorker ...@@ -9,8 +10,12 @@ class ExpirePipelineCacheWorker
queue_namespace :pipeline_cache queue_namespace :pipeline_cache
urgency :high urgency :high
worker_resource_boundary :cpu worker_resource_boundary :cpu
data_consistency :delayed, feature_flag: :load_balancing_for_expire_pipeline_cache_worker
idempotent! # This worker _should_ be idempotent, but due to us moving this to data_consistency :delayed
# and an ongoing incompatibility between the two switches, we need to disable this.
# Uncomment once https://gitlab.com/gitlab-org/gitlab/-/issues/325291 is resolved
# idempotent!
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
def perform(pipeline_id) def perform(pipeline_id)
...@@ -21,3 +26,4 @@ def perform(pipeline_id) ...@@ -21,3 +26,4 @@ def perform(pipeline_id)
end end
# rubocop: enable CodeReuse/ActiveRecord # rubocop: enable CodeReuse/ActiveRecord
end end
# rubocop:enable Scalability/IdempotentWorker
---
name: load_balancing_for_expire_pipeline_cache_worker
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62073
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/331360
milestone: '14.0'
type: development
group: group::memory
default_enabled: false
...@@ -42,8 +42,15 @@ ...@@ -42,8 +42,15 @@
subject.perform(617748) subject.perform(617748)
end end
it_behaves_like 'an idempotent worker' do skip "with https://gitlab.com/gitlab-org/gitlab/-/issues/325291 resolved" do
let(:job_args) { [pipeline.id] } it_behaves_like 'an idempotent worker' do
let(:job_args) { [pipeline.id] }
end
end end
it_behaves_like 'worker with data consistency',
described_class,
feature_flag: :load_balancing_for_expire_pipeline_cache_worker,
data_consistency: :delayed
end end
end end
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册