Closed luketn closed 1 year ago
/cc @evanchooly, @gastaldi, @geoand, @loicmathieu, @stuartwdouglas
FYI - I recently upgraded a script I have to start a mongo container with a replica set from 5 to 6, and the only change I needed to make was to use 'mongosh' instead of 'mongo' for the tool to --eval commands on. These two seem to have very similar APIs, so the changes required may be minimal: https://gist.github.com/luketn/1efe282d8e3104c052daca3b1c616547
This is a limitation of the current version of Testcontainers. This has already been fixed in Testcontainers but not yet release, see this PR https://github.com/testcontainers/testcontainers-java/pull/5771
@loicmathieu hmm.. it's been a long time between releases on that project. I would have thought a project like that would get released all the time as container projects change so often. Do you guys have any maintainers there that could do a release?
@luketn
Do you guys have any maintainers there that could do a release?
Not that I know, the best will be to contact the Testcontainers team (for ex via the afforementioned PR) and ask for a release.
I wish ii had seen this earlier. I just spent the week with one of them. I'll bug him and see what's up.
Testcontainers 1.17.4 was just released and it works with Mongo 6
Just tested the mongo:6
image with out devservices and it works on Quarkus 2.15.
I'm not sure on which version the update to Testcontainers was made that fix the issue but it's OK now so I'm closing it.
Describe the bug
You can change the version of MongoDB used by dev services using the configuration property:
This works well for all versions of MongoDB up to version 6, in which they have retired the old mongo client in favour of a new client mongosh.
Expected behavior
Add this config:
Should work just as 5 would have.
Actual behavior
An exception is thrown on start, when the container manager tries to run the mongo shell in order to configure a replica set (which is very cool by the way!):
How to Reproduce?
Add this config:
Run ./mvnw compile quarkus:dev (on any project with the quarkus-mongodb-client extension)
Output of
uname -a
orver
Darwin Lukes-M1-MBP.lan 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:20:05 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T8101 arm64
Output of
java -version
openjdk version "17.0.4" 2022-07-19 OpenJDK Runtime Environment GraalVM CE 22.2.0 (build 17.0.4+8-jvmci-22.2-b06) OpenJDK 64-Bit Server VM GraalVM CE 22.2.0 (build 17.0.4+8-jvmci-22.2-b06, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.13.0.CR1
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537) Maven home: /Users/lthompson/.m2/wrapper/dists/apache-maven-3.8.4-bin/52ccbt68d252mdldqsfsn03jlf/apache-maven-3.8.4 Java version: 17.0.4, vendor: GraalVM Community, runtime: /Library/Java/JavaVirtualMachines/graalvm-ce-java17-22.2.0/Contents/Home Default locale: en_AU, platform encoding: UTF-8 OS name: "mac os x", version: "12.6", arch: "aarch64", family: "mac"
Additional information
No response