You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Valkey adoption is growing as an alternative to Redis to avoid licensing constraints, so reliable test coverage with real Valkey instances is important.
Valkey‑Search enables advanced features like vector search and hybrid queries with tags/filters—common in GenAI workloads. Having a container with correct modules ensures realistic integration tests.
Valkey GLIDE provides multi-language clients (Python/Java/Node/Go) with async support and best practices; a ValkeyContainer would align with this ecosystem for integration testing.
Parity with existing Testcontainers DB modules: Similar to RedisContainer, a dedicated ValkeyContainer simplifies setup (config, wait strategy, connection helpers) beyond what a generic container can offer.
aren't they drop in compatible? or is that no longer the case, like different log messages? another reason i initially dont want to accept is that redis went back to agpl (although it seems very confusing so i can see that being a weak driver of adoption for valkey still)
glide also supports redis, the search module is interesting and would be the only reason i dont have a response for, if in fact a separate module is needed (e.g. to listen for different log messages)
You’re right—Valkey is largely drop-in compatible with Redis for core commands, and GLIDE supports both. For most basic use cases, a generic container or even RedisContainer works fine.
The main reasons for proposing a dedicated module are:
Valkey-Search (vector search, hybrid queries) is unique to Valkey and increasingly used in GenAI workloads. Tests that rely on these features need a container with the module preloaded.
Parity and simplicity: Similar to RedisContainer, a ValkeyContainer provides API for developers adopting Valkey without manual tweaks.
While Valkey is largely drop in compatible for older versions of Redis, the latest Valkey versions include some features that are not supported in Redis like Multi-db support for cluster configurations. Additionally, there are small differences in some commands. Also, the various modules can have significant differences especially in Valkey-Search and Valkey-JSON modules. Effective testing requires testing against the actual db you will use in production and not something that is "close".
drop in support in this context means you can change the redis container image argument and it works
While we can change the container image, we can't easily change the internal client being used. The best we can do is tell users to avoid the use of the get_client method and instead create a client using their client library. We are trying to create a first class experience for Valkey users, and right now they have to jump through extra hoops to use python TestContainers with Valkey. These same restrictions do not exist for Go, Java, Node or Rust languages which all have a Valkey module.
Activity
daric93 commentedon Dec 8, 2025
I’ll start working on this issue and plan to submit a PR soon.
alexanderankin commentedon Dec 8, 2025
aren't they drop in compatible? or is that no longer the case, like different log messages? another reason i initially dont want to accept is that redis went back to agpl (although it seems very confusing so i can see that being a weak driver of adoption for valkey still)
alexanderankin commentedon Dec 8, 2025
glide also supports redis, the search module is interesting and would be the only reason i dont have a response for, if in fact a separate module is needed (e.g. to listen for different log messages)
daric93 commentedon Dec 8, 2025
You’re right—Valkey is largely drop-in compatible with Redis for core commands, and GLIDE supports both. For most basic use cases, a generic container or even RedisContainer works fine.
The main reasons for proposing a dedicated module are:
jbrinkman commentedon Dec 11, 2025
While Valkey is largely drop in compatible for older versions of Redis, the latest Valkey versions include some features that are not supported in Redis like Multi-db support for cluster configurations. Additionally, there are small differences in some commands. Also, the various modules can have significant differences especially in Valkey-Search and Valkey-JSON modules. Effective testing requires testing against the actual db you will use in production and not something that is "close".
alexanderankin commentedon Dec 11, 2025
drop in support in this context means you can change the redis container image argument and it works
jbrinkman commentedon Feb 16, 2026
While we can change the container image, we can't easily change the internal client being used. The best we can do is tell users to avoid the use of the get_client method and instead create a client using their client library. We are trying to create a first class experience for Valkey users, and right now they have to jump through extra hoops to use python TestContainers with Valkey. These same restrictions do not exist for Go, Java, Node or Rust languages which all have a Valkey module.
Tranquility2 commentedon Apr 3, 2026
@jbrinkman @daric93 the motivation is clear :) can you please recheck the PR it still has some gaps.