Action is required for anyone with a local cht-core development environment. Specifically, to continue running the latest cht-core code from master, you need to update your local CouchDB deployment.
(This only applies to developers running the local cht-core development environment. Production instances (or production-like instances, e.g. those deployed with docker-helper) running a released version of the CHT are not impacted.)
I have merged the cht-core PR for replacing freetext search views with Nouveau. See the linked PR for more details on the code changes, but crucially a new Nouveau docker service is now needed to allow the CHT server to run freetext queries.
The latest cht-couchdb.yml compose file has been updated to include the necessary Nouveau service. If you deployed your local CouchDB instance following the Local Dev Environment Guide then the simply update your local copy of the cht-couchdb.yml and restart the compose services with the following commands:
Hi @jkuester , I use the brew installed couchdb for cht-core development and was wondering what configuration change do I need to make and how? This might also be useful for anyone using couchdb directly.
That is a good question! (I know you know this, but for anyone else reading, the only supported version of Couch guaranteed to work with the CHT is the one we ship in our custom docker images. Only that version should be used in production. But, for local development, YMMV with various other options.)
For this upgrade to Nouveau, the main thing you need to do on a local Couch instance is just follow the docs to enable/run the Nouveau service and configure Couch to connect to it. The CHT containers are just running Nouveau with the default settings, so no fancy custom config should be required.
Seconding Josh’s reminder that CHT does not play nice with non CHT based CouchDB installs. Here’s a related forum post on the topic where there were bad side effects. We strongly recommend you run the docker setup as outlined on the dev setup docs.
Looking at the links Josh provided - I didn’t see a way of running Nouveau with brew. I suspect you’ll have to come over to use docker anyway!
Do let us know where you end up - as you said - what we share here can benefit other users who are in similar situations.
If I’m working on code that will land in 4.22, which version of couch should I use? Another way of asking this is: can I use the new Nouveau version safely on 4.2x code so I don’t have to switch back and forth?
Yes! For local development work there should be no problem running the Nouveau-enabled version of Couch even when working with older versions of the code-base (at least up to a certain point). When switching back and forth between different versions of code, running build-dev should make sure you get the correct ddoc versions for the code you are trying to run.
When running these commands, the environment variable COUCHDB_PASSWORD was needed for docker ... pull too:
$ docker compose -f docker-compose.yml -f couchdb-override.yml pull
error while interpolating services.couchdb.environment.[]: required variable COUCHDB_PASSWORD is missing a value: COUCHDB_PASSWORD must be set