Add redis db to the mail_room option hash

What does this MR do and why?

This MR adds redis db to the options sent to mail_room gem.

The problem being solved is described in https://gitlab.com/gitlab-org/gitlab-mail_room/-/merge_requests/33. Basically the db from redis url (redis://url?db=X) is not taken into account for a connection and needs do be specified as a separated option.

This MR:

  • changes the mail_room.yml configuration
  • adds the db value to the option hash used for mail_room

How to set up and validate locally

One way how to verify this is when trying to use incoming emails functionality.

Prerequisites

  • incoming emails configured
  • local copy of gitlab-mail_room branch
  • local gitlab-mail_room gem specified in gitlab Gemfile gem 'gitlab-mail_room', '~> 0.0.9', require: 'mail_room', path: "PATH_TO_LOCAL_GEM"

Validation

  • stop the rails-background-jobs in order to be able to verify gdk stop rails-background-jobs
  • run mail_room bundle exec mail_room -c './config/mail_room.yml'
  • send an email to the address defined in incoming emails configuration
  • check the background jobs on http://127.0.0.1:3000/admin/background_jobs - email_receiver should contain a new job

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 Jarka Košanová

Merge request reports

Loading