From 040c3d162ceddf9f8f469f7f250057d13839e738 Mon Sep 17 00:00:00 2001 From: Joe Woodward Date: Thu, 26 Sep 2024 14:52:37 +0100 Subject: [PATCH 1/4] Setup PostReceive worker for sticky data behind flag We have introduced a new feature flag to rollout the sticky data consistency for PostReceive worker. This worker handles a lot of traffic as it is triggered after each push to GitLab. For safety we are enabling stick consistency behind a feature flag named load_balanacing_for_sticky_post_receive_worker. This is described in this documentation for workers: https://docs.gitlab.com/ee/development/sidekiq/worker_attributes.html#feature_flag-property Closes https://gitlab.com/gitlab-org/gitlab/-/issues/402254 --- app/workers/post_receive.rb | 2 +- .../load_balanacing_for_sticky_post_receive_worker.yml | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 config/feature_flags/worker/load_balanacing_for_sticky_post_receive_worker.yml diff --git a/app/workers/post_receive.rb b/app/workers/post_receive.rb index 9a4fbea53a157f..4005c61b2bbe80 100644 --- a/app/workers/post_receive.rb +++ b/app/workers/post_receive.rb @@ -5,7 +5,7 @@ class PostReceive idempotent! deduplicate :none - data_consistency :always + data_consistency :always, feature_flag: :load_balanacing_for_sticky_post_receive_worker sidekiq_options retry: 3 include Gitlab::Experiment::Dsl diff --git a/config/feature_flags/worker/load_balanacing_for_sticky_post_receive_worker.yml b/config/feature_flags/worker/load_balanacing_for_sticky_post_receive_worker.yml new file mode 100644 index 00000000000000..2f695f8e7996e1 --- /dev/null +++ b/config/feature_flags/worker/load_balanacing_for_sticky_post_receive_worker.yml @@ -0,0 +1,9 @@ +--- +name: load_balanacing_for_sticky_post_receive_worker +feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/402254 +introduced_by_url: +rollout_issue_url: +milestone: '17.5' +group: group::source code +type: worker +default_enabled: false -- GitLab From aea58da6670b08772de8ecd92e4317749edcf049 Mon Sep 17 00:00:00 2001 From: Joe Woodward Date: Thu, 26 Sep 2024 15:24:54 +0000 Subject: [PATCH 2/4] Apply 1 suggestion(s) to 1 file(s) Co-authored-by: DANGER_GITLAB_API_TOKEN --- .../worker/load_balanacing_for_sticky_post_receive_worker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/feature_flags/worker/load_balanacing_for_sticky_post_receive_worker.yml b/config/feature_flags/worker/load_balanacing_for_sticky_post_receive_worker.yml index 2f695f8e7996e1..a655d736ede422 100644 --- a/config/feature_flags/worker/load_balanacing_for_sticky_post_receive_worker.yml +++ b/config/feature_flags/worker/load_balanacing_for_sticky_post_receive_worker.yml @@ -1,7 +1,7 @@ --- name: load_balanacing_for_sticky_post_receive_worker feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/402254 -introduced_by_url: +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/167317 rollout_issue_url: milestone: '17.5' group: group::source code -- GitLab From ecee258c074c41f50a66097c80b7fab381c477fe Mon Sep 17 00:00:00 2001 From: Joe Woodward Date: Thu, 26 Sep 2024 15:42:22 +0000 Subject: [PATCH 3/4] Apply 1 suggestion(s) to 1 file(s) --- .../worker/load_balanacing_for_sticky_post_receive_worker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/feature_flags/worker/load_balanacing_for_sticky_post_receive_worker.yml b/config/feature_flags/worker/load_balanacing_for_sticky_post_receive_worker.yml index a655d736ede422..62a470e4305c75 100644 --- a/config/feature_flags/worker/load_balanacing_for_sticky_post_receive_worker.yml +++ b/config/feature_flags/worker/load_balanacing_for_sticky_post_receive_worker.yml @@ -2,7 +2,7 @@ name: load_balanacing_for_sticky_post_receive_worker feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/402254 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/167317 -rollout_issue_url: +rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/495040 milestone: '17.5' group: group::source code type: worker -- GitLab From 1fb654331ce13f7c9eee62310ba99589831a2ad9 Mon Sep 17 00:00:00 2001 From: Joe Woodward Date: Thu, 26 Sep 2024 15:43:49 +0000 Subject: [PATCH 4/4] Apply 1 suggestion(s) to 1 file(s) --- app/workers/post_receive.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/workers/post_receive.rb b/app/workers/post_receive.rb index 4005c61b2bbe80..c75e1a8a170707 100644 --- a/app/workers/post_receive.rb +++ b/app/workers/post_receive.rb @@ -5,7 +5,7 @@ class PostReceive idempotent! deduplicate :none - data_consistency :always, feature_flag: :load_balanacing_for_sticky_post_receive_worker + data_consistency :sticky, feature_flag: :load_balanacing_for_sticky_post_receive_worker sidekiq_options retry: 3 include Gitlab::Experiment::Dsl -- GitLab