maxking / maxking/docker-mailman
[BUG]Unable to use mailman-web against recent mariadb
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 278
- Forks
- 121
- PR merge metrics
- No merged PRs in 30d
Description
Tag/version of Container Images
0.5.2
mailman-web (working on 0.4) mailman-web fails to start on 0.5.2. when using Mariadb 12.3.2 (LTS). The log says:
mailman-web-1 | Traceback (most recent call last):
mailman-web-1 | File "manage.py", line 10, in <module>
mailman-web-1 | execute_from_command_line(sys.argv)
mailman-web-1 | File "/usr/lib/python3.8/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
mailman-web-1 | utility.execute()
mailman-web-1 | File "/usr/lib/python3.8/site-packages/django/core/management/__init__.py", line 375, in execute
mailman-web-1 | self.fetch_command(subcommand).run_from_argv(self.argv)
mailman-web-1 | File "/usr/lib/python3.8/site-packages/django/core/management/base.py", line 323, in run_from_argv
mailman-web-1 | self.execute(*args, **cmd_options)
mailman-web-1 | File "/usr/lib/python3.8/site-packages/django/core/management/base.py", line 361, in execute
mailman-web-1 | self.check()
mailman-web-1 | File "/usr/lib/python3.8/site-packages/django/core/management/base.py", line 387, in check
mailman-web-1 | all_issues = self._run_checks(
mailman-web-1 | File "/usr/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 64, in _run_checks
mailman-web-1 | issues = run_checks(tags=[Tags.database])
mailman-web-1 | File "/usr/lib/python3.8/site-packages/django/core/checks/registry.py", line 72, in run_checks
mailman-web-1 | new_errors = check(app_configs=app_configs)
mailman-web-1 | File "/usr/lib/python3.8/site-packages/django/core/checks/database.py", line 10, in check_database_backends
mailman-web-1 | issues.extend(conn.validation.check(**kwargs))
mailman-web-1 | File "/usr/lib/python3.8/site-packages/django/db/backends/mysql/validation.py", line 9, in check
mailman-web-1 | issues.extend(self._check_sql_mode(**kwargs))
mailman-web-1 | File "/usr/lib/python3.8/site-packages/django/db/backends/mysql/validation.py", line 14, in _check_sql_mode
mailman-web-1 | cursor.execute("SELECT @@sql_mode")
mailman-web-1 | File "/usr/lib/python3.8/site-packages/django/db/backends/utils.py", line 67, in execute
mailman-web-1 | return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
mailman-web-1 | File "/usr/lib/python3.8/site-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
mailman-web-1 | return executor(sql, params, many, context)
mailman-web-1 | File "/usr/lib/python3.8/site-packages/django/db/backends/utils.py", line 82, in _execute
mailman-web-1 | return self.cursor.execute(sql)
mailman-web-1 | File "/usr/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 71, in execute
mailman-web-1 | return self.cursor.execute(query, args)
mailman-web-1 | File "/usr/lib/python3.8/site-packages/MySQLdb/cursors.py", line 209, in execute
mailman-web-1 | res = self._query(query)
mailman-web-1 | File "/usr/lib/python3.8/site-packages/MySQLdb/cursors.py", line 317, in _query
mailman-web-1 | self._post_get_result()
mailman-web-1 | File "/usr/lib/python3.8/site-packages/MySQLdb/cursors.py", line 352, in _post_get_result
mailman-web-1 | self._rows = self._fetch_row(0)
mailman-web-1 | File "/usr/lib/python3.8/site-packages/MySQLdb/cursors.py", line 325, in _fetch_row
mailman-web-1 | return self._result.fetch_row(size, self._fetch_type)
mailman-web-1 | decimal.InvalidOperation: [<class 'decimal.ConversionSyntax'>]
This seems to be a known bug in mysqlclient 1.4.6 (see, for example, https://github.com/saltstack/salt/issues/65414#issuecomment-1766773779 and https://github.com/PyMySQL/mysqlclient/issues/768) when used against mariadb 11.0 and newer.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the mailman-web 0.5.2 container dependencies and the Django MySQL backend path shown in the traceback, focusing on mysqlclient 1.4.6 compatibility with MariaDB 11.0 and newer. Reproduce startup against the reported MariaDB version; done when mailman-web starts without the decimal.InvalidOperation failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, docker, mariadb, python
- Domain
- backend, databases, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100