From e3b5ecd35f9b72d4e4c11a47db3c816a389400cc Mon Sep 17 00:00:00 2001
From: Stan Hu <stanhu@gmail.com>
Date: Mon, 15 Aug 2022 11:35:55 -0700
Subject: [PATCH] Update redis gem to v4.7.1

This introduces a number of fixes and improvements. Most notably,
there are deprecations in how pipelined and multi/exec commands are
handled.

Diff: https://my.diffend.io/gems/redis/4.4.0/4.7.1

Changelog: changed
---
 Gemfile                        | 2 +-
 Gemfile.lock                   | 4 ++--
 config/initializers/7_redis.rb | 2 ++
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Gemfile b/Gemfile
index 5fcf56cf6a401..3fb1cd43a2c89 100644
--- a/Gemfile
+++ b/Gemfile
@@ -233,7 +233,7 @@ gem 'js_regex', '~> 3.7'
 gem 'device_detector'
 
 # Redis
-gem 'redis', '~> 4.4.0'
+gem 'redis', '~> 4.7.0'
 gem 'connection_pool', '~> 2.0'
 
 # Redis session store
diff --git a/Gemfile.lock b/Gemfile.lock
index f4e7c22c72f97..f7bd6ffe584cf 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1098,7 +1098,7 @@ GEM
       json
     recursive-open-struct (1.1.3)
     redcarpet (3.5.1)
-    redis (4.4.0)
+    redis (4.7.1)
     redis-actionpack (5.3.0)
       actionpack (>= 5, < 8)
       redis-rack (>= 2.1.0, < 3)
@@ -1701,7 +1701,7 @@ DEPENDENCIES
   rdoc (~> 6.3.2)
   re2 (~> 1.4.0)
   recaptcha (~> 4.11)
-  redis (~> 4.4.0)
+  redis (~> 4.7.0)
   redis-actionpack (~> 5.3.0)
   redis-namespace (~> 1.8.1)
   request_store (~> 1.5)
diff --git a/config/initializers/7_redis.rb b/config/initializers/7_redis.rb
index 415574e1ce1d7..e233c282836dd 100644
--- a/config/initializers/7_redis.rb
+++ b/config/initializers/7_redis.rb
@@ -1,5 +1,7 @@
 # frozen_string_literal: true
 
+Redis.raise_deprecations = true unless Rails.env.production?
+
 # We set the instance variable directly to suppress warnings.
 # We cannot switch to the new behavior until we change all existing `redis.exists` calls to `redis.exists?`.
 # Some gems also need to be updated
-- 
GitLab