Skip to content

Update default initializer value for Sidekiq routing_rules

Gregorius Marco requested to merge marcogreg/routing-rules-initializer-1 into master

What does this MR do and why?

In gitlab-com/gl-infra/scalability#1491 (closed), we need to update self-managed instances to use a simple routing_rules by default, which is to route all jobs to the default queue. Instead of updating all other self-managed instances (ie Omnibus and Helm Chart), updating the initializer file here only requires one change.

As a side effect, some tests are failing due to these tests relying on queue name generated based on the Worker name. The affected tests have been updated to cater to this new default.

NOTE

This MR is a duplicate in favor of !96647 (closed) that has been failing the pipelines of qa-reliable job in start-review-app-pipeline due to unstable test environment. Previous discussions and comments can be found in the above MR.

Related MRs

Below MRs address the default config for Sidekiq servers to watch default, mailers queues only in respective installations. This MR has to be merged first before merging below MRs.

Screenshots or screen recordings

When there is routing_rules defined, the value is unchanged.

image

When routing_rules is an empty array, it will be initialized to [["*", "default"]

image

When routing_rules doesn't exist, it will be initialized to [["*", "default"]

image

How to set up and validate locally

  1. Change the routing_rules in config/gitlab.yml
  2. Start gdk rails cosnole
  3. Check Settings['sidekiq']['routing_rules'] as in screenshots above.

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 Gregorius Marco

Merge request reports