-
-
Notifications
You must be signed in to change notification settings - Fork 589
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
feat: add support for MariaDB 11.4 LTS, fixes #6061 #6243
Conversation
Wow, so ambitious! Congrats! It will require images to be pushed and the tag to be updated. |
@rfay, I see. I think you have to push the images, right? I see where I have to update the tag but what should I set it as? Should I match |
I almost always use the branch name as tag, yes. If you want to push it into your own hub.docker.com account you'll be able to test it... Otherwise, we'll get to it an push it. But you always want to be able to test your own PR yourself right ? :) It takes some time to push, may be frustrating. It's easier for us to do with the automated workflows. |
For some reason they don't yet have a mariadb:11.4 docker image out there at this point, see https://hub.docker.com/_/mariadb/tags?page=&page_size=&ordering=&name=11.4 As a result... we won't have one either. I'm going to close this for now, but when you are able to
Please come back and comment and we'll re-open it. There may be problems that have to be resolved with the upstream jammy image. |
Thanks. I didn't realize that it needed that base image (I was in a different impression from a different task long back). I'll reopen this when the Docker image is available. For then, can you point me to instructions on how I would test this locally? It was not obvious to me from this README. I suppose that since there are no other changes to DDEV code except allowed options, I can just use this as base image in my config.yaml. Is that good enough? |
Also, to be able to push to my own Docker Hub, I suppose I should modify this line in |
`make mariadb_11.4_both VERSION=<your-branch-tag`` Change the tag in versionconstants.go. Test. You don't have to push it to test. If you did want to push it, `make PUSH=true VERSION= mariadb_11.4_both More in https://ddev.readthedocs.io/en/stable/developers/release-management/#pushing-docker-images-manually |
I tested this PR, Docker images for There are compatibility breaking changes in MariaDB 11. The image cannot be built:
There is a new compatibility package
But it doesn't have Edit: there is another package for server symlinks,
|
They're working on naming changes. mysqld becomes mariadbd. We should be able to accommodate that OK. |
Perhaps the simplest thing is to add a symlink, |
It's hard-coded to show deprecation for each of the programs, that are called by symlinks:
Therefore, it is probably better to use the original names. |
I assume you mean the new name, mariadbd ? |
Yes, I think we can add a check: if there is So this will continue to work for older Docker Of course, it requires more attention, but it's worth it in the long run, I don't think people will be happy when they switch to |
But I'm not sure about all the other things that have |
Each of those should be driven by configuration, so should not be affected by their name changing. However, the default /etc/mysql.conf could definitely be affected. |
Rebased to resolve conflicts. |
I think we can and should continue using the client and server compat packages and keep things the same for now.
|
Rebased. I added One drawback is that the build has become slower for MariaDB 11.4 (9 minutes vs 2.5 minutes for everything else): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, works perfectly.
I did a ddev debug migrate-database mariadb:11.4
and it didn't have any hiccups at all.
I don't like the output (as you don't):
All project containers are now ready.
mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead
mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead
We might try to capture that in a future PR. I think it would be the same as capturing the mysql 8.x complaint about using password on command line.
$ ddev describe
┌────────────────────────────────────────────────────────────────────────────┐
│ Project: d10 ~/workspace/d10 https://d10.ddev.site │
│ Docker platform: orbstack │
│ Router: traefik │
├──────────┬──────┬─────────────────────────────────────┬────────────────────┤
│ SERVICE │ STAT │ URL/PORT │ INFO │
├──────────┼──────┼─────────────────────────────────────┼────────────────────┤
│ web │ OK │ https://d10.ddev.site │ drupal PHP8.2 │
│ │ │ InDocker: web:8025,443,80 │ nginx-fpm │
│ │ │ Host: 127.0.0.1:33103,33102 │ docroot:'web' │
│ │ │ │ Perf mode: mutagen │
│ │ │ │ NodeJS:20 │
├──────────┼──────┼─────────────────────────────────────┼────────────────────┤
│ db │ OK │ InDocker: db:3306 │ mariadb:11.4 │
│ │ │ Host: 127.0.0.1:33104 │ User/Pass: 'db/db' │
│ │ │ │ or 'root/root' │
├──────────┼──────┼─────────────────────────────────────┼────────────────────┤
│ Mailpit │ │ Mailpit: https://d10.ddev.site:8026 │ │
│ │ │ Launch: ddev mailpit │ │
├──────────┼──────┼─────────────────────────────────────┼────────────────────┤
│ All URLs │ │ https://d10.ddev.site, │ │
│ │ │ https://127.0.0.1:33102, │ │
│ │ │ http://d10.ddev.site, │ │
│ │ │ http://127.0.0.1:33103 │ │
└──────────┴──────┴─────────────────────────────────────┴────────────────────┘
Download the artifacts for this pull request:
See Testing a PR. |
// MySQLRemoveDeprecatedMessage is used to remove the deprecation from stderr when using mysql tools with MariaDB 11.x and later. | ||
// mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead | ||
// mysqldump: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb-dump' instead | ||
const MySQLRemoveDeprecatedMessage = " 2> >(grep -v 'Deprecated program name.' >&2) " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very fancy. For all my years of bash and shell I've never seen this notation before! I had to ask chatgpt to explain it to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found it here https://stackoverflow.com/a/52575087/8097891
I removed the deprecation warnings from At first I thought I could wrap #!/bin/bash
mariadb "$@" This command mysql -uroot -proot -e "SELECT @@character_set_database, @@collation_database;" transforms into this mysql -uroot -proot -e SELECT @@character_set_database, @@collation_database; In the end I just filtered the stderr output. |
We don't have to do it here, but the output from mysql:8.0 about using credentials on command-line is the same class of annoyance. |
Yes, I saw how it was fixed for mysql:8.0 in a different way here: (Edit: it's not fixed Unfortunately there is no workaround for MariaDB (at least for now): |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
* docs: Warn about Codespaces (ddev#6321) [skip ci] Co-authored-by: Matthias Andrasch <777278+mandrasch@users.noreply.github.com> * docs: Improve ddev debug test by offering suggestions early [skip ci] (ddev#6323) * feat: add support for MariaDB 11.4 LTS, fixes ddev#6061 (ddev#6243) Co-authored-by: Stanislav Zhuk <stasadev@gmail.com> * docs: pacify textlint on mysql/https (ddev#6336) [skip ci] * docs: revisit WSL Docker Desktop setup instructions (ddev#6330) * fix: autodownload yarn from corepack, and set cache-folder, fixes ddev#6332 (ddev#6333) * docs: windows-wsl2-dd needs apt install for ngrok (ddev#6341) [skip ci] * build: check docker-compose 2.28.1 (ddev#6340) [skip ci] * fix: use real path to global config location, fixes ddev#6328 (ddev#6329) * test: stop running nightly tests [skip ci] (ddev#6347) * test: Improve reliability of TestProcessHooks (intermittent failures), fixes ddev#6313 (ddev#6314) * fix: Drupal 10 and Drupal 11 settings have migrated, set state_cache (ddev#6346) [skip ci] Co-authored-by: Stanislav Zhuk <stasadev@gmail.com> * build: use IPv4 inside a container, mariadb-client 11.4 for the webserver (ddev#6334) [skip ci] * fix: pass all valid options to nested commands in `ddev composer create`, fixes ddev#6300, fixes ddev#6246, for ddev#5058 (ddev#6303) Co-authored-by: Randy Fay <randy@randyfay.com> Co-authored-by: Ralf Koller <1665422+rpkoller@users.noreply.github.com> * docs: fix up textlint complaints * Turn off defaultTerms * Use exclude properly with textlint for VS Code * update for additional textlint complaints * remove redundant empty exclude section * Try to get textlint/reviewdog to report --------- Co-authored-by: Matthias Andrasch <777278+mandrasch@users.noreply.github.com> Co-authored-by: hussainweb <hussainweb@gmail.com> Co-authored-by: Stanislav Zhuk <stasadev@gmail.com> Co-authored-by: Ralf Koller <1665422+rpkoller@users.noreply.github.com>
The Issue
MariaDB 11.4 is LTS. We can add support for that here.
MariaDB 11.x removed
mysql*
symlinks from the Docker images:And added warning messages:
How This PR Solves The Issue
mysql*
symlinks back formariadb:11.4
Docker image.mysql
andmysqldump
fromddev debug migrate-database
,ddev export-db
andddev import-db
:Manual Testing Instructions
ddev config --database=mariadb:11.4
and make sure it works.ddev debug migrate-database mariadb:10.11
andddev debug migrate-database mariadb:11.4
ddev export-db --file=db.sql.gz
ddev import-db --file=db.sql.gz
Automated Testing Overview
I mainly tried to copy the PR #4902 and I couldn't find any tests to change here.
Related Issue Link(s)
Fixes #6061.
Release/Deployment Notes