Repository navigation
Remove code for end-of-life MongoDB, Kafka, Neo4j and Redis Stack versions - #1597
Open
cristianrgreco wants to merge 32 commits into
Open
cristianrgreco wants to merge 32 commits into
cristianrgreco wants to merge 32 commits into
Conversation
This was referenced Oct 13, 2026
…-mongodb-code # Conflicts: # package-lock.json # packages/modules/mongodb/package.json
…drop-eol-kafka-mongodb-code
…drop-eol-kafka-mongodb-code
…drop-eol-kafka-mongodb-code
…ol-kafka-mongodb-code
…-mongodb-code # Conflicts: # packages/modules/mongodb/src/mongodb-container.ts
…ions-search-document
…drop-eol-kafka-mongodb-code
…ol-kafka-mongodb-code # Conflicts: # packages/modules/redis/src/redis-container.test.ts
…-mongodb-code # Conflicts: # packages/modules/redis/src/redis-container.test.ts
…drop-eol-kafka-mongodb-code
…drop-eol-kafka-mongodb-code
…drop-eol-kafka-mongodb-code
cristianrgreco
marked this pull request as ready for review
October 14, 2026 14:38
This branch has not been deployed
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.
Summary
Removes module code that exists only for versions past the vendor's end of life. Follow-up to #1589, #1592, #1593 and #1595, which stopped testing those versions.
MongoDB
MongoDBContaineralways usesmongosh. TheisV5OrLater()check and the legacymongoshell branch for MongoDB below 5.0 are gone, and so is thecompare-versionsdependency of@testcontainers/mongodb.MongoDB 4.4 ended 2024-02-29 and 5.0 ended 2024-10-31 (endoflife.date). Supported today: 7.0, 8.0, 8.3, 9.0.
Side effect, a fix: a tag that is not a version (
mongo:latest,mongo:noble) made the version check throw, which selected the legacymongoshell. Current images do not ship it, so the health check could never pass. Probe onmain:Kafka
Everything at or below Confluent Platform 7.7 is past community end of support (Supported Versions and Interoperability). Removed:
commandKraft()and the two<7.4.0branches). From 7.4 the image configures KRaft itself.Kept: ZooKeeper mode and the
>=8.0.0switch, which serve the supported 7.9 and 8.x lines.Neo4j
Neo4j 4.4 ended 2025-11-30 (endoflife.date). Supported today: 5.26 and 2026.09.
NEO4JLABS_PLUGINSis no longer set. Neo4j 5 renamed it toNEO4J_PLUGINS, which the module already sets.dbms.security.procedures.whitelistbecomesdbms.security.procedures.allowlist. On 5.26.31 and 2026.09.0 the old name only loggedUse of deprecated setting 'dbms.security.procedures.whitelist'and was mapped toallowlist, so the effective setting is unchanged (checked withSHOW SETTINGSon both).Redis Stack
Redis Stack is discontinued: its README says maintenance releases of 6.2, 7.2 and 7.4 stopped in December 2025 and points users to Redis 8, which includes the Stack modules. The last
redis/redis-stack-serverimage was pushed on 2025-11-03.RedisContainerno longer special-cases images whose name containsredis-stack(passing its arguments throughREDIS_ARGSand the image's/entrypoint.sh).redis/redis-stack-server:7.4.0-v4line in the moduleDockerfileand the "Redis stack" docs section are removed.Other implementations
modules/kafka/kafka.goL385-L386 at9d2885db), and Java's currentConfluentKafkaContaineris documented as compatible withcp-kafka7.4.0 and later (docs/modules/kafka.mdL39 at9bb3c2dc). Neither supports KRaft below 7.4; unlike Go, this PR does not keep a guard for it.mongosh … || mongo …and no version check (JavaMongoDBContainer.javaL135, Gomodules/mongodb/cli.goL30). Not followed here: the maintainer's decision is not to keep code for end-of-life versions.Verification
Local, macOS arm64, Docker Desktop:
npx vitest run packages/modules/mongodb/src/mongodb-container.test.ts --maxConcurrency=2npx vitest run packages/modules/kafka --maxConcurrency=2npx vitest run packages/modules/redisDockerfileimage)npx vitest run packages/modules/neo4j --maxConcurrency=2Dockerfileswitched locally (APOC, APOC Extended and Graph Data Science load on both)npm run format,npm run lint,npm run knip,npm run check-compiles: clean.package-lock.jsonchanges only thecompare-versionsentry of@testcontainers/mongodb.inside_blockmarkers still resolve.Left to CI: Podman, Node 22 and 24, linux/amd64, the Atlas Local file.
Breaking
new MongoDBContainer("mongo:4.4…")and any other image withoutmongoshno longer becomes healthy;start()fails after the startup timeout.KafkaContainer#withKraft()on Confluent Platform below 7.4, and with SASL below 7.5, is no longer rejected with a message and no longer set up; the broker fails to start. ZooKeeper mode on those versions is unchanged.Neo4jContainer#withApoc()andwithPlugins()no longer install plugins on Neo4j 4 images.RedisContainerwith aredis/redis-stack-serverimage now starts plainredis-serverwith the given arguments, so the Stack modules are not loaded. Redis 8 has them built in.