Skip to content

Fix compatibility for Sidekiq 7 and Redis 6.0

Sylvester Chin requested to merge sc1-sidekiq7-redis6-compat into master

What does this MR do and why?

This MR vendors the Sidekiq v7.1.6 gem and makes minor modifications for compatibility with Redis 6.0. The modifications include

  1. Not raise error if Redis version is >= 6.0, < 6.2
  2. Update various zrange commands to work on Redis 6.0

See #439418 (comment 1746532656)

Note that compatibility changes !142986 (e3c5b89b) are referenced from https://github.com/sidekiq/sidekiq/commit/1aca434e5cd830cbd0020f1f82ef3a3cb6b2d477

The gem was vendored using gem unpack sidekiq, moving the folder into vendor/gems. Gemfile, Rakefile and tests were copied from github repo.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

  1. Run docker run -p 6379:6379 -d redis:6.0-alpine to set up a Redis using v6.0
  2. Add into config/redis.yml
➜  gitlab git:(sc1-sidekiq7-redis6-compat) ✗ cat config/redis.yml
---
development:
  queues: "redis://localhost:6379"
  1. Run Sidekiq
bundle exec ruby bin/sidekiq-cluster default,mailers,email_receiver,hashed_storage:hashed_storage_migrator,hashed_storage:hashed_storage_project_migrate,hashed_storage:hashed_storage_project_rollback,hashed_storage:hashed_storage_rollbacker,project_import_schedule,service_desk_email_receiver -e development --timeout 10 --max-concurrency 30 --min-concurrency 30
  1. On the master branch, it will raise an error (You are connecting to Redis 6.0.16, Sidekiq requires Redis 6.2.0 or greater) while it will pass on this MR.
Edited by Sylvester Chin

Merge request reports