server icon indicating copy to clipboard operation
server copied to clipboard

🔨 CI should be using dbtool.py for db setup

Open zach2good opened this issue 2 years ago • 1 comments

I affirm:

  • [x] I understand that if I do not agree to the following points by completing the checkboxes my issue will be ignored.
  • [x] I have read and understood the Contributing Guide and the Code of Conduct.
  • [x] I have searched existing issues to see if the issue has already been opened, and I have checked the commit log to see if the issue has been resolved since my server was last updated.

Describe the feature

I've just noticed that we don't use dbtool at all for our CI, we manually create the databases (understandable, because they're docker containers) and then populate them manually. We could at least be using dbtool to do an update on the empty xidb table, then we get coverage of dbtool working all the time in Linux and Windows

zach2good avatar Jan 04 '24 18:01 zach2good

I'm not sure if it's just a Debian thing or if it's still the case with all the refactoring done, but originally dbtool didn't quite work out of the box on Linux like it does on Windows. IIRC there was an issue with using the root mysql user, which is why the quick start guide differs between Linux and Windows on that step, where Linux creates a new mysql user and gives them table permissions. That sounds like something Debian specific so it might not be an issue with Ubuntu. If that's the case then replacing this section with python dbtool.py update full should work. If that doesn't work, you'd need to create the new user, give it permissions (maybe just setting MARIADB_USER and MARIADB_PASSWORD is enough), and set XI_NETWORK_SQL_LOGIN and XI_NETWORK_SQL_PASSWORD env variables. Unfortunately, I don't know enough about this stuff to test it.

cocosolos avatar Jan 04 '24 23:01 cocosolos