Skip to content

Fix conflicted sidekiq configruation

What does this MR do?

In !1968 (merged), we introduced new sidekiq.routingRules configuration to route a job from a worker to a desired queue. While we are rolling out this new configuration to Staging (detailed in gitlab-com/gl-infra/production#4715 (comment 586158587)), we detected that this configuration works perfectly on Web, but does not make any effect for jobs dispatched from a sidekiq Worker.

It turns out that in Sidekiq's config map , there is a another Sidekiq configuration locates at the same level of aforementioned routingRules configuration. As there are two sidekiq keys, the second one overrides the first.

This MR is to fix that conflict by moving the Sidekiq logging format to sidekiq.tpl

Result

Before

The generated gitlab.yml has two sidekiq keys:

Screen_Shot_2021-05-27_at_13.54.08

That prevents the target workers (or any other workers) routes to the queue generated from its names.

Screen_Shot_2021-05-27_at_13.53.31

After

log_format and routing_rules are grouped under one single key:

Screen_Shot_2021-05-27_at_13.26.17

Double check the queue of the target workers again:

Screen_Shot_2021-05-27_at_13.36.49

Related issues

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for omnibus-gitlab opened
Edited by Hossein Pursultani

Merge request reports