Adds redis-namespace as runtime dependency
Remove unused redis-namespace gem (gitlab-org/gitlab!135344 - merged) removes redis-namespace
from the GitLab app and starting mail_room
fails with this error after that:
bundle exec mail_room -c ./config/mail_room.yml
#<Thread:0x000000010756ee30 /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/mailbox_watcher.rb:35 run> terminated with exception (report_on_exception is true):
<internal:/Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require': cannot load such file -- redis/namespace (LoadError)
from <internal:/Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/arbitration/redis.rb:49:in `client'
from /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/arbitration/redis.rb:34:in `deliver?'
from /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/mailbox.rb:108:in `deliver?'
from /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/imap/connection.rb:178:in `block in new_message_ids'
from /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/imap/connection.rb:178:in `select'
from /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/imap/connection.rb:178:in `new_message_ids'
from /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/imap/connection.rb:163:in `new_messages'
from /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/imap/connection.rb:135:in `process_mailbox'
from /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/imap/connection.rb:45:in `wait'
from /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/mailbox_watcher.rb:37:in `block in run'
bundler: failed to load command: mail_room (/Users/msaleiko/.asdf/installs/ruby/3.1.4/bin/mail_room)
<internal:/Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require': cannot load such file -- redis/namespace (LoadError)
from <internal:/Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
from /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/arbitration/redis.rb:49:in `client'
from /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/arbitration/redis.rb:34:in `deliver?'
from /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/mailbox.rb:108:in `deliver?'
from /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/imap/connection.rb:178:in `block in new_message_ids'
from /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/imap/connection.rb:178:in `select'
from /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/imap/connection.rb:178:in `new_message_ids'
from /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/imap/connection.rb:163:in `new_messages'
from /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/imap/connection.rb:135:in `process_mailbox'
from /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/imap/connection.rb:45:in `wait'
from /Users/msaleiko/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/gitlab-mail_room-0.0.23/lib/mail_room/mailbox_watcher.rb:37:in `block in run'
There is a discussion about this issue available, where we identified two options:
-
Readd the
redis-namespace
gem to GitLab (quick fix MR raised to revert the changes mentioned above) - Make
redis-namespace
a (runtime). dependency forgitlab-mail_room
(this MR). This would also mean to deviate from the upstream gem. - From @schin1
I would add that we "could" drop namespace altogether. But perhaps 16.7 should focus on fixing the breakage.
Quick fix for this is to remove :namespace
from config/mail_room.yml
in the GitLab project. Customers have already reported this issue Unable to start Gitlab Mailroom after updating ... (gitlab-org/gitlab#433493 - closed)
Edited by Marc Saleiko