Skip to content

Change cron worker to queue sub-workers

Pedro Pombeiro requested to merge pedropombeiro/421201/queue-sub-workers into master

What does this MR do and why?

The current approach with the click_house_ci_finished_builds_sync_worker (introduced in %16.5) doesn't allow for having multiple runners, even though it accepts arguments. In this MR, we're fixing this shortcoming by doing the following:

  1. Add a new ClickHouse::CiFinishedBuildsSyncWorker class that will perform the same work as the previous cronjob worker
  2. Change the existing ClickHouse::CiFinishedBuildsSyncCronWorker so it takes a total number of workers and dispatches the appropriate ClickHouse::CiFinishedBuildsSyncWorkers;
  3. Add a version value to ClickHouse::CiFinishedBuildsSyncCronWorker so that it ignores jobs that were queued without a version, as we don't really mind discarding those.

I didn't feel it was necessary to go through the process specified in https://docs.gitlab.com/ee/development/sidekiq/compatibility_across_updates.html#changing-the-arguments-for-a-worker since we haven't released the original worker yet.

EE: true

Part of #421201 (closed)

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Pedro Pombeiro

Merge request reports

Loading