restheart icon indicating copy to clipboard operation
restheart copied to clipboard

Achieve full compatibility with FerretDB

Open ujibang opened this issue 1 year ago • 5 comments

Brief overview

FerretDB is the truly Open Source MongoDB alternative, built on Postgres.

We are working with the FerretDB team to make RESTHeart and FerretDB work together.

Rationale

Extend support to other DBs

Detailed documentation

TBD

ujibang avatar Aug 02 '23 14:08 ujibang

We added your integration tests to our CI see a failed run here. I will parse through the output and create issues and link them to our config files.

b1ron avatar Nov 07 '23 14:11 b1ron

We noticed that restheart-core tests currently fail when run against MongoDB: https://github.com/FerretDB/dance/actions/runs/6964444145/job/18951686919?pr=649 Is it expected? Are we doing something wrong in https://github.com/FerretDB/dance/pull/649

AlekSi avatar Nov 23 '23 07:11 AlekSi

Some features of RESTHeart requires MongoDB to be run as a replica set. This because change streams and transactions are available only on a replica set.

We run our tests against a single node replica set.

See https://restheart.org/docs/setup#run-with-mongodb

Basically you need to run mongo as follows::

$ mongod --fork --syslog --replSet=foo -dbpath=/tmp/db && mongosh --quiet --eval 'if (!rs.isMaster().ismaster) rs.initiate({});'

ujibang avatar Nov 23 '23 08:11 ujibang

You can also skip tests that require a replica set (and run the tests against a standalone MongoDB process) as follows:

$ ./mvnw clean verify -Dkarate.options="--tags ~@requires-replica-set"

Also note that at https://github.com/softInstigate/restheart#execute-the-integration-tests-suite you will find instructions on how to run and test RESTHeart against FerretDB. You can notice that we specify there -Dkarate.options="--tags ~@requires-replica-set"

ujibang avatar Nov 23 '23 08:11 ujibang

Thanks @ujibang, we configured our MongoDB service as a single node replica set and it now passes.

b1ron avatar Nov 23 '23 10:11 b1ron