Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add server-check that verifies that the system is using the CHT version of CouchDb #9860

Open
dianabarsan opened this issue Mar 26, 2025 · 2 comments
Labels
Type: Technical issue Improve something that users won't notice

Comments

@dianabarsan
Copy link
Member

dianabarsan commented Mar 26, 2025

Describe the issue
The CHT API will start even when it runs with an incompatible version of CouchDb, for example the default CouchDb image. There are a number of CouchDb configs that we know are incompatible with the CHT (multi replica, other js engines, etc - this is a non-exhaustive list).

Describe the improvement you'd like
Add a server-check that verifies the version of CouchDb that is running, to make sure that we're on the correct version. I believe that we also need to add some sort of endpoint to the CouchDb image that returns the actual version, and compare that to the expected version.

Describe alternatives you've considered
Leave it as it is.

A recent forum support request revealed that a partner was using a default CouchDb image instead of the CHT one and they had issues with users getting logged out: https://forum.communityhealthtoolkit.org/t/extending-session-timeout-duration/4794/3

We have also had unfortunate cluster upgrades where only one node in the cluster was upgraded - these faulty upgrades were due to a bug in the upgrade script, and it left the instance running in an inconsistent state until something broke. Having a check like this can prevent data-loss through data corruption if a similar event happens.

@dianabarsan dianabarsan added the Type: Technical issue Improve something that users won't notice label Mar 26, 2025
@karanziie1990
Copy link

Hi @dianabarsan
Can I take up this issue..? I believe we need to work on the ./cht-core/couchdb/tests part of the project to close this issue.

@dianabarsan
Copy link
Member Author

dianabarsan commented Apr 9, 2025

Hi @karanziie1990

The checks for this need to be in API startup, CouchDb tests run in CI when releases are made, and never run when a project is launched. So a different solution is required, and I'm not sure how straightforward it is.

Please feel free to give this a shot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Technical issue Improve something that users won't notice
Projects
None yet
Development

No branches or pull requests

2 participants