Replace abandoned fakeredis with real redis, upgrade redis-rb to 5.x#22
Merged
Conversation
fakeredis is unmaintained (last release 0.9.2, 2023) and hard-pins redis ~> 4.8, which kept redis-rb stuck at 4.8.1 across every Dependabot bump. Drop it in favor of testing against a real redis server. - Remove fakeredis from the Gemfile and the spec/support stub - Relock: redis 4.8.1 -> 5.4.1 (pulls in redis-client) - Add a redis service to the CI test_and_lint job, since fakeredis was previously the only reason specs passed without a server Specs need no changes: redis-rb 5 connects lazily, so type assertions and verify!/quit work against the live server.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
fakeredisis unmaintained — its last release (0.9.2, May 2023) hard-pinsredis ~> 4.8, which is why every Dependabot bump (including #19) leftredisstuck at4.8.1while it moved everything else. There is no fakeredis release that supports redis-rb 5, so this replaces it rather than upgrading it.The specs never exercised fakeredis's in-memory data store — they only assert connection types and call
verify!/quit. So this switches the test suite to a real redis server, which is what the gem actually ships against.Changes
fakeredisfrom theGemfileand delete thespec/support/fakeredis.rbglobal stubredis 4.8.1 → 5.4.1(pulls inredis-client)redisservice to the CItest_and_lintjob — fakeredis was previously the only reason specs passed without a serverNotes
redis ">= 4", so downstream apps on redis 4 are not forced to upgrade — this only advances the dev/test lock.verify!/quitwork against the live server.Verification
bundle exec rake→ 10 examples, 0 failures (run against a local redis)bundle exec standardrb→ clean