Skip to content

Update default initializer value for Sidekiq routing_rules

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

NOTE

This MR is closed due to broken test env not being able to pass qa-reliable job. New MR: !97908 (merged)

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.

Related MRs

Below MRs address the default config for Sidekiq servers to watch default, mailers queues only in respective installations.

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