Skip to content

Fix redis-namspace dependency version for UBI mailroom

Hossein Pursultani requested to merge 1800-fix-ubi-mailroom-deps into master

What does this MR do?

Fix redis-namspace dependency version for UBI mailroom

UBI-flavored gitlab-mailroom was using an older version of redis-namespace Gem which is incompatible with Ruby 3. The version is updated to match the Debian-flavored image.

Changelog: fixed

Test plan

Set up the Docker Compose stack:

services:
  redis:
    image: redis:6.2.7-bullseye
    hostname: redis

  dovecot:
    image: blackflysolutions/dovecot
    hostname: dovecot
    environment:
      VSITE_CIVIMAIL_USER: civimail
      VSITE_CIVIMAIL_PASS: civimail
    
  mailroom:
    image: registry.gitlab.com/gitlab-org/build/cng/gitlab-mailroom:1800-fix-ubi-mailroom-deps-ubi8
    volumes:
      - ${PWD}/mailroom.yaml:/var/opt/gitlab/mail_room.yml:ro

  endpoint:
    image: hashicorp/http-echo
    hostname: endpoint
    command:
      - -text
      - "hello world"

With this configuration:

:mailboxes:
  - :name: "inbox"
    :email: "civimail"
    :password: "civimail"
    :host: "dovecot"
    :port: 143
    :ssl: false
    :delete_after_delivery: false
    :expunge_deleted: false
    :logger:
      :log_path: "/dev/stdout"
    :delivery_method: postback
    :delivery_options:
      :delivery_url: 'http://endpoint:5678'
      :content_type: "text/plain"
    :arbitration_method: redis
    :arbitration_options:
      :redis_url: redis://redis:6379
      :namespace: mail_room:gitlab

The IMAP server needs a small patch and the Mailroom must be restarted:

docker-compose exec dovecot /bin/sh -c 'mkdir /civimail; chown 5000:5000 /civimail'
docker-compose start mailroom

Once the setup is ready, append a message to the mailbox to trigger the the message processing pipeline:

docker-compose exec dovecot telnet localhost 143

Use the following IMAP commands (in the same telnet terminal):

  1. l1 LOGIN civimail civimail

  2. a1 APPEND "INBOX" {48} with the following message:

    Subject: Test message
    
    This is a test message.

    Make sure that there is no additional spaces or line breaks. The message length must be exactly 48 characters.

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
  • When ready for review, MR is labeled "~workflow::ready for review" per the Distribution MR workflow

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Integration tests added to GitLab QA
  • The impact any change in container size has should be evaluated
  • New dependencies are managed with dependencies.io

Closes #1800 (closed)

Edited by Clemens Beck

Merge request reports