canvas-lms/Gemfile.d/redis.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
799 B
Ruby
Raw Normal View History

# frozen_string_literal: true
#
# Copyright (C) 2014 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
group :redis do
bundle update redis closes AE-494 [skip-stages=Flakey] [skip-crystalball] several things going on here. in general, many of our monkeypatches have been implemented in upstream, but in a vastly different way, so we need to enable/configure those things * `servers` is no longer accepted as a backwards compatible configuration option; use `url` * `database` is no longer accepted as a backwards compatible configuration option; you _can_ use `db`, but preferable to just use `url` * no longer merge together redis.yml and cache_store.yml; if one references the other, simply use the config from the other * `nil_store` is no longer accepted as a backwards compatible configuration option; use `null_store` (almost no one should be explicitly using this anyway, so nbd) * automatically not-even-trying when redis has previously failed is now handled by redis-client's circuit breaker. be sure to configure it in redis.yml/cache_store.yml/dynamic settings * ignoring redis failures completely is already done by RedisCacheStore; just rely on that, except for the few cases where we use redis directly. some of these now take advantage of a new `failsafe` kwarg (and often in combination with pipelining), and some just handle it directly * move logging to a RedisClient middleware * move Twemproxy disallowed commands to a RedisClient middleware * simplify Canvas.lookup_cache_store to have far less special casing (in particular, patching is done automatically now) * add ability to use Redis::Cluster (configure with `nodes` instead of `url`) * still override Redis::Distributed's HashRing, so that we don't change our ring layout with the new MD5 hashing for servers. but we got to vastly simplify the new class, due to upstream refactorings allowing us to simply override a single method rather than having to re-implement the entire class * statsd reporting of redis errors is now simply passed as a callback to RedisCacheStore, breaking CanvasCache's dependency on InstStatsd Change-Id: I787672677a21994d40ae304dbac0fbf3a960a779 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/325641 Reviewed-by: Jacob Burroughs <jburroughs@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com> Build-Review: Cody Cutrer <cody@instructure.com>
2023-08-19 04:32:45 +08:00
gem "redis-clustering", "~> 5.0"
gem "redis-scripting", "1.0.1"
end