mysqldb engine broken in docker image posted to docker hub and quay
zoredache opened this issue · comments
What is the issue ?
Updated to the latest docker image for recordsansible/ara-api from docker hub. I am now getting error messages like:
Traceback (most recent call last):
File "/usr/local/bin/ara-manage", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.10/site-packages/ara/server/__main__.py", line 42, in main
raise MissingMysqlclientException from e
ara.setup.exceptions.MissingMysqlclientException: The mysqlclient python library must be installed in order to use the MySQL database engine.
[ara] Using settings file: /opt/ara/settings.yaml
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/ara/server/__main__.py", line 40, in main
import MySQLdb # noqa
ModuleNotFoundError: No module named 'MySQLdb'
What should be happening ?
I assume it should be working, and not erroring out. I didn't need to do anything special with older images with a DATABASE_ENGINE: django.db.backends.mysql
.
The docs seem to suggest that the published images should be 'batteries included' and should already include everything needed for MySQL and PostgreSQL.
Hi and thanks for the issue !
The intent is indeed for the container images to include the necessary dependencies for deploying with sqlite, postgresql and mysql.
I briefly came across this issue as well but then (apparently mistakenly) believed it was fixed after pushing new builds out.
It could have something to do with 5d7d074.
I will try to find out so we can fix it.
New image builds are out and the issue no longer reproduces.
It may have been some chicken-and-egg between the commit I mentioned and the release of 1.6.1.
We already have an issue opened about adding integration tests for postgresql and mysql in the container image build job: #411 such tests may have prevented that from landing on the container registryies.
I'll consider the issue fixed for now but thanks for reporting it.