Open hantsy opened 4 years ago
This should be easy to resolve - will create a PR.
Actually, while testing, I'm finding that couchbase:community-6.5.1
is not a drop-in replacement for couchbase/server:6.5.1
- startup fails with an error which I don't have the couchbase knowledge to diagnose: The value must be one of the following: [forestdb]"
.
Because of this, I'd say that the compatibility check is working correctly: it's designed to prevent the wrong image being used, but give the user a chance to override.
If you really do want to use the couchbase:community
images, please follow the instructions in the error message and use DockerImageName.parse("couchbase:community-YOURVERSION").asCompatibleSubstituteFor("couchbase/server")
as the image. This tells Testcontainers that you're declaring compatibility between the image you're using and the image that the CouchbaseContainer
class was designed/tested with.
I'm not sure this community image will work though, due to the error I mentioned.
The good news is that couchbase:enterprise-*
does seem to function as a drop-in replacement for couchbase/server:*
. Unfortunately our compatibility checks only look at the image name, not at the tag part, so for now it will still be necessary to use `asCompatibleSubstituteFor I'm afraid.
@daschl is it expected that the Couchbase module is not compatible with the couchbase:community-*
images from Docker Hub's official library?
@rnorth there is no 6.6 under naming couchbase/server
@rnorth I'll come up with a PR to make sure community edition also works. Right now we did not test with community, and community only allows for a different index engine (forestdb). The fix shouldn't be hard, working on it.
@rnorth @hantsy provided a PR in #3428
Note that this helps to work around the issue and provides more flexibility in general, but I still wonder if we should do two more things:
couchbase:enterprise-6.5.1
, since I'm not sure when but it looks like the naming has changed to a format like this?couchbase:community-6.5.1
and 2) apply the storage setting automatically?@daschl I think the default couchbase
(couchbase:latest) should be the enterprise.
@hantsy I'm not sure I would want that personally, since I'd rather want the server version to be the same I currently use in prod (so it stays at one version and not automatically advances, until I manually bump it to something else)
I would like to use the latest product when starting a new project, but the versions used in testcontainers are not up to date requently.
Let's leave that final call to @rnorth, since I assume there is a established best practice with other modules and couchbase should just follow that.
After updated to couchbase:community as you suggested, got the store error, which could be resolved in your prs. I will test it again when it is merged.
I faced the described problem The value must be one of the following: [forestdb]
.
As I understand, fix is ready. Could you finish review please?
@daschl @rnorth @aaronjwhiteside
I think this is good to go now?
@rnorth @bsideup trying again :) I think this is good to be merged.
For the latest Couchbase 6.6, we can use
couchbase:communtiy
andcouchbase:enterprise
to get the latest Couchbase, but I tried to use this as DockerImageName, it will complain the docker name is not compatible withcouchbase/server
.Check: https://hub.docker.com/_/couchbase