habitica icon indicating copy to clipboard operation
habitica copied to clipboard

Issue #14349 - Fixed group creation on Docker by updating to Mongo 4.2.8 replica set

Open alexiswatson opened this issue 2 years ago • 4 comments

Fixes #14349

Changes

  • Updated mongo image in docker-compose.dev to 4.2.8
  • Converted Mongo instance from standalone to replica set
  • Added mongo-init.js script to initialize replica set

UUID: 973e45cb-ff63-40ae-ac99-9538871b0941

alexiswatson avatar Dec 25 '22 07:12 alexiswatson

Note that some of the linting doesn't really apply here, based on the execution environment of mongo-init.js (ex: sleep() is very much a thing). As the wiki mentions, other tests don't reliably run in Docker, so I'd be happy to review the results here (perhaps tackling that in a separate issue).

alexiswatson avatar Dec 25 '22 17:12 alexiswatson

It occurs to me that as a first-time contributor, an admin would need to approve running the workflows here. If one wouldn't mind kicking things off (with the above caveats), I'd be happy to help close this out!

alexiswatson avatar Jan 17 '23 21:01 alexiswatson

As mentioned above, this code runs in Mongo's execution context. rs and sleep are very much defined. This leaves:

Error: 5:1 error Expected an assignment or function call and instead saw an expression no-unused-expressions

If the expression conditional syntax is an issue here, happy to change it, but before I do I'd appreciate confirmation from a maintainer that we can either suppress or ignore the other linting here.

Looking forward to getting this merged!

alexiswatson avatar Jan 23 '23 07:01 alexiswatson

help a lot,thanks very much!!!

ychisbest avatar Dec 13 '23 09:12 ychisbest

We're now using Mongo version 5.0.23, so I'm closing this. If you're still having a problem, please open a new issue. Thanks!

CuriousMagpie avatar Apr 25 '24 19:04 CuriousMagpie