Restore Jedis 7.0 compatibility for Redis integrations#6587
Open
jewoodev wants to merge 2 commits into
Open
Conversation
Use `UnifiedJedis` as the Redis client-facing type and create default clients with `JedisPooled`, which is available in Jedis 7.0.0. This avoids loading the newer `RedisClient` type while still allowing newer Jedis clients that extend `UnifiedJedis` to be provided by users. Update Redis chat memory, vector store, semantic cache, tests, and docs to use the compatible client types. Fixes spring-projects#6584 Signed-off-by: jewoodev <jewoos15@naver.com>
Add coverage for the Redis chat memory auto-configuration alongside the default chat memory auto-configuration. When the Redis repository starter is active, `ChatMemoryRepository` should resolve to `RedisChatMemoryRepository` and the default `InMemoryChatMemoryRepository` should back off. Signed-off-by: jewoodev <jewoos15@naver.com>
Contributor
|
Spring AI is base on Spring Boot 4.1 which uses jedis 7.4 not 7.0. |
Contributor
Author
|
The reported application resolves Jedis 7.0.0 through its dependency management. This PR uses |
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.
Redis chat memory currently references
RedisClient, which is only available in newer Jedis versions. Spring Boot 4.0.x manages Jedis 7.0.0, so the Redis chat memory starter can fail during auto-configuration beforeRedisChatMemoryRepositoryis created.This changes the Redis integrations to use
UnifiedJedisas the client-facing type and creates default clients withJedisPooled, which is available in Jedis 7.0.0. Newer Jedis clients that extendUnifiedJediscan still be provided by users.The same compatibility adjustment is applied across Redis chat memory, Redis vector store, Redis semantic cache, tests, and docs.
Validated with Jedis 7.0.0 by running dependency resolution and package verification for the affected Redis modules and auto-configurations.
Fixes #6584