Skip to content

Conversation

@bsbodden
Copy link
Collaborator

Replace all deprecated Jedis classes with the new unified Jedis 7.2 API:

  • Upgrade Jedis dependency from 7.0.0 to 7.2.0
  • Replace JedisPool/JedisPooled with RedisClient.create()
  • Replace JedisSentinelPool with RedisSentinelClient.builder()
  • Remove JedisPoolConfig dependency from RedisConnectionConfig
  • Update SearchIndex to use unified getUnifiedJedis() method
  • Update VCR infrastructure (VCRContext, VCRRegistry, VCRCassetteStore)
  • Update all test base classes to use RedisClient
  • Update LangChain4J stores and documentation examples
  • Update demo applications (rag-multimodal, standalone)

The new Jedis 7.2 API provides:

  • RedisClient for standalone connections
  • RedisSentinelClient for HA deployments
  • RedisClusterClient for cluster mode
  • All extend UnifiedJedis for backwards compatibility

This removes deprecation warnings and modernizes the codebase to use the recommended Jedis connection patterns.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the codebase to use the modern Jedis 7.2 API, replacing deprecated classes with the new unified connection pattern. The migration upgrades Jedis from 7.0.0 to 7.2.0 and eliminates deprecation warnings throughout the codebase.

Key changes include:

  • Replacing JedisPool/JedisPooled with RedisClient.create() for standalone connections
  • Replacing JedisSentinelPool with RedisSentinelClient.builder() for HA deployments
  • Updating all test infrastructure, stores, and demo applications to use the new API

Reviewed changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
core/build.gradle.kts Upgrades Jedis dependency from 7.0.0 to 7.2.0
core/src/main/java/com/redis/vl/redis/RedisConnectionManager.java Refactored to use RedisClient and RedisSentinelClient instead of JedisPool/JedisSentinelPool
core/src/main/java/com/redis/vl/redis/RedisConnectionConfig.java Removed deprecated toJedisPoolConfig() method
core/src/main/java/com/redis/vl/index/SearchIndex.java Removed deprecated Jedis constructor, updated to use UnifiedJedis exclusively via getUnifiedJedis()
core/src/main/java/com/redis/vl/test/vcr/VCRContext.java Updated to use UnifiedJedis and raw commands via sendCommand for BGSAVE/LASTSAVE
core/src/main/java/com/redis/vl/test/vcr/VCRRegistry.java Updated field type from JedisPooled to UnifiedJedis
core/src/main/java/com/redis/vl/test/vcr/VCRCassetteStore.java Updated field type from JedisPooled to UnifiedJedis
core/src/main/java/com/redis/vl/langchain4j/RedisVLDocumentStore.java Updated javadoc example to use RedisClient.create()
core/src/main/java/com/redis/vl/langchain4j/RedisVLChatMemoryStore.java Updated javadoc example to use RedisClient.create()
core/src/test/java/com/redis/vl/test/BaseIntegrationTest.java Migrated from JedisPool to RedisClient, simplified cleanup
core/src/test/java/com/redis/vl/BaseIntegrationTest.java Migrated from JedisPool to RedisClient for test infrastructure
core/src/test/java/com/redis/vl/BaseSVSIntegrationTest.java Migrated from JedisPool to RedisClient
core/src/test/java/com/redis/vl/redis/RedisConnectionManagerTest.java Updated tests to use getClient() instead of getJedis(), removed connection pooling test
core/src/test/java/com/redis/vl/index/SearchIndexTest.java Updated to create RedisClient directly, removed separate Jedis client usage
core/src/test/java/com/redis/vl/index/SearchIndexIntegrationTest.java Updated to use unifiedJedis for hash operations instead of deprecated jedis field
core/src/test/java/com/redis/vl/schema/JsonFieldAliasIntegrationTest.java Updated to use RedisClient.create() instead of JedisPooled
core/src/test/java/com/redis/vl/langchain4j/RedisVLEmbeddingStoreTest.java Updated to use RedisClient.create() instead of JedisPooled
core/src/test/java/com/redis/vl/langchain4j/RedisVLEmbeddingStoreFilterTest.java Updated to use RedisClient.create() instead of JedisPooled
core/src/test/java/com/redis/vl/langchain4j/RedisVLDocumentStoreTest.java Updated to use RedisClient.create() instead of JedisPooled
core/src/test/java/com/redis/vl/langchain4j/RedisVLChatMemoryStoreTest.java Updated to use RedisClient.create() instead of JedisPooled
demos/rag-multimodal/src/main/java/com/redis/vl/demo/rag/service/ServiceFactory.java Updated to use RedisClient.create() for connection initialization
demos/rag-multimodal/src/main/java/com/redis/vl/demo/rag/MultimodalRAGStandalone.java Updated to use RedisClient.create(), removed HostAndPort import
demos/rag-multimodal/src/test/java/com/redis/vl/BaseIntegrationTest.java Migrated from JedisPool to RedisClient
demos/rag-multimodal/src/test/java/com/redis/vl/demo/rag/service/MultimodalRAGIntegrationTest.java Updated to use jedis reference consistently from base class
docs/design/VCR_TEST_SYSTEM.md Updated documentation examples to show RedisClient usage
docs/design/EMBEDDINGS_CACHE_ENHANCEMENT.md Updated constructor signature to use RedisClient
docs/content/modules/ROOT/pages/langchain4j.adoc Updated code examples to use RedisClient.create() instead of JedisPooled

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Replace all deprecated Jedis classes with the new unified Jedis 7.2 API:

- Upgrade Jedis dependency from 7.0.0 to 7.2.0
- Replace JedisPool/JedisPooled with RedisClient.create()
- Replace JedisSentinelPool with RedisSentinelClient.builder()
- Remove JedisPoolConfig dependency from RedisConnectionConfig
- Update SearchIndex to use unified getUnifiedJedis() method
- Update VCR infrastructure (VCRContext, VCRRegistry, VCRCassetteStore)
- Update all test base classes to use RedisClient
- Update LangChain4J stores and documentation examples
- Update demo applications (rag-multimodal, standalone)

The new Jedis 7.2 API provides:
- RedisClient for standalone connections
- RedisSentinelClient for HA deployments
- RedisClusterClient for cluster mode
- All extend UnifiedJedis for backwards compatibility

This removes deprecation warnings and modernizes the codebase
to use the recommended Jedis connection patterns.
@bsbodden bsbodden force-pushed the bsb/jedis-7-2-migration branch from 7019b66 to 36b7091 Compare December 18, 2025 20:53
@bsbodden bsbodden merged commit 2312bbb into main Dec 18, 2025
4 checks passed
@bsbodden bsbodden deleted the bsb/jedis-7-2-migration branch December 18, 2025 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants