Skip to content

Move ClickHouse workers to EE

Adam Hegyi requested to merge 448789-disable-analytics-ch-workers-setting into master

What does this MR do and why?

Note: the MR is quite big because I moved some files to EE but the actual changes are minimal. I added comments where change happened:

  • This is a new test.
  • Enabled check change.

This MR moves the Contribution Analytics related workers to EE and also add an extra settings. The workers will not do anything if ClickHouse was disabled via an application setting.

Moving the workers to EE is safe because the cron jobs are only enabled for SaaS, the jobs are not invoked on FOSS at the moment. See the Gitlab.com do block: https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/initializers/1_settings.rb#L902

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

  1. Disable the setting: Gitlab::CurrentSettings.update(use_clickhouse_for_analytics: true)
  2. Try to run a BG job: ClickHouse::EventsSyncWorker.new.perform
  3. You should see: {:status=>:disabled}

Related to #448789 (closed)

Edited by Adam Hegyi

Merge request reports