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

fix: Replace mysql with mariadb binary in MariaDB module #942

Conversation

FlorianHockmann
Copy link
Contributor

The command has been renamed from mysql to mariadb and it looks like the symlink that has been in place for many versions has also been removed in newer MariaDB versions.

What does this PR do?

mysql command changed to mariadb for the MariaDB module.

Why is it important?

Wait policy fails otherwise for newer MariaDB images.

Related issues

How to test this PR

Try to use the MariaDB image with a new tag, like latest.

@netlify
Copy link

netlify bot commented Jun 29, 2023

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit 7e6a7e9
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/649e71b0c452c80008b1a1cf
😎 Deploy Preview https://deploy-preview-942--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@HofmeisterAn HofmeisterAn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for raising the issue and submitting the PR. I think we need to update the builder too:

_command = new List<string> { "mysql", "--protocol=TCP", $"--port={MariaDbPort}", $"--user={configuration.Username}", $"--password={configuration.Password}", configuration.Database, "--wait", "--silent", "--execute=SELECT 1;" };

Do you know if removing the symlink is intended (are there any release notes)? Maybe it is an issue in the latest version of the image. I assume this will break many configurations, see: MariaDB/mariadb-docker#519.

The command has been renamed from mysql to mariadb and it looks like the
symlink that has been in place for many versions has also been removed
in newer MariaDB versions.

Fixes testcontainers#941
@FlorianHockmann FlorianHockmann force-pushed the bugfix/Issue_941_MariadbCommand branch from 3172096 to 7e6a7e9 Compare June 30, 2023 06:09
@FlorianHockmann
Copy link
Contributor Author

I think we need to update the builder too:

Oh right, I just updated the commit to also change it there.

Do you know if removing the symlink is intended (are there any release notes)?

I only found this part in the release notes:

MDEV-29582 deprecate mysql* names

but looks like they didn't only deprecate them...

It however sounds me like they don't want to revert this change:

I haven't see a major case for re-adding mysql commands, we where going to do it eventually, maybe a depreciation would have been nicer, but it seems to be done and the major use case of healthchecks has been improved.

(Source)

But at least for Testcontainers it makes sense in my opinion to switch to the mariadb command even if they would be adding the symlinks back as mariadb is the correct name and the symlink was only for backwards compatibility.

@HofmeisterAn HofmeisterAn changed the title MariaDB: mysql command replaced by mariadb fix: Replace mysql with mariadb binary in MariaDB module Jun 30, 2023
@HofmeisterAn HofmeisterAn added the bug Something isn't working label Jun 30, 2023
@HofmeisterAn HofmeisterAn merged commit 171535c into testcontainers:develop Jun 30, 2023
@FlorianHockmann FlorianHockmann deleted the bugfix/Issue_941_MariadbCommand branch July 3, 2023 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: MariaDB WaitUntil expects mysql command, replaced by mariadb in newer version
2 participants