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

Allow setting collation via env variable and add uvloop #3729

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Grennith
Copy link
Contributor

@Grennith Grennith commented Jan 18, 2025

What type of PR?

Enhancement / Bugfix

What does this PR do?

As of #3701, the collation shall be set by overwriting SQLALCHEMY_DATABASE_URI to contain the collation of the related DB. However, this is currently not possible in the Helm chart of Mailu at all. It's statically set there and would also require not setting DB_NAME etc. to not have it overwritten, see https://github.com/Mailu/Mailu/blob/master/core/admin/mailu/configuration.py#L144

Additionally, uvloop is added to the prod requirements of which postfix-mta-sts-resolver makes use of.

Related issue(s)

Prerequisites

Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

  • [ x ] In case of feature or enhancement: documentation updated accordingly
  • Unless it's docs or a minor change: add changelog entry file.

With Mailu#3701 the remark was left to set the DB collation for MariaDB setups. However, the Helm chart has no option to overwrite the SQLAlchemy URI really. It selfs DB_USER, DB_PW, DB_NAME and DB_HOST and thus triggers the Alchemy URI to be overwritten (and it overwrites it statically as well...).
This commit adds the parameter / environment variable DB_APPENDIX allowing for, e.g., '?collation=utf8mb4_unicode_ci' to be set using an environment variable which the Helm chart can then set.
postfix-mta-sts-resolver can optionally use uvloop speeding up asyncio execution
@Grennith Grennith changed the title Db appendix Allow setting collation via env variable Jan 18, 2025
Copy link
Contributor

mergify bot commented Jan 18, 2025

Thanks for submitting this pull request.
Bors-ng will now build test images. When it succeeds, we will continue to review and test your PR.

bors try

Note: if this build fails, read this.

@Grennith Grennith changed the title Allow setting collation via env variable Allow setting collation via env variable and add uvloop Jan 18, 2025
bors-mailu bot added a commit that referenced this pull request Jan 18, 2025
@bors-mailu
Copy link
Contributor

bors-mailu bot commented Jan 18, 2025

try

Build succeeded:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant