Allow extending upon MySQL client extra configuration#40410
Open
jissereitsma wants to merge 8 commits intomagento:2.4-developfrom
Open
Allow extending upon MySQL client extra configuration#40410jissereitsma wants to merge 8 commits intomagento:2.4-developfrom
jissereitsma wants to merge 8 commits intomagento:2.4-developfrom
Conversation
This commit allows for extending the original client configuration (hard-coded) with an optional `etc/mysql-client-config.php` file) allowing to add or override entries.
|
Hi @jissereitsma. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit allows for extending the original client configuration (hard-coded) with an optional
etc/mysql-client-config.phpfile) allowing to add or override entries.Description (*)
By default, the Integration Test Framework generates a file
defaults_extra.cnfper sandbox with the following content (in this example, assuming user and password areroot):Sometimes, it is needed though to extend this configuration. One example here is when you are using a MariaDB client that defaults to TLS/SSL while the MariaDB server is Docker-based and only serving self-generated SSL certificates or worse, not serving SSL at all. In that case, the best way is to disable SSL for the client:
This PR allows for an additional file
dev/tests/integration/etc/mysql-client-config.phpto be created with content like the following:The returned array of this file is merged into the original array and then converted into proper INI output.
Manual testing scenarios (*)
maria-dump(akamysqldump) is dumping the database.Note that the actual error is normally hidden in the output. However, the Integration Test output might show something to this:
Next, running the command
mariadb-dump --defaults-file='/var/www/html/dev/tests/integration/tmp/sandbox-0-7541d88ba2b35f337a534b2eac286d8af07070d5588b8583cfd058f6f47e3972/defaults_extra.cnf' --host='mysqltmpfs' --port='3306' --no-tablespaces 'magento2' > '/var/www/html/dev/tests/integration/tmp/sandbox-0-7541d88ba2b35f337a534b2eac286d8af07070d5588b8583cfd058f6f47e3972/setup_dump_magento2.sqlmanually, will output this SSL error:dev/tests/integration/etc/mysql-client-config.phpand rerun the tests. The tests should now succeed.Contribution checklist (*)