Fix MariaDB test failures caused by ssl-verify-server-cert warnings in STDERR by Copilot · Pull Request #231 · wp-cli/.github · GitHub
Skip to content

Fix MariaDB test failures caused by ssl-verify-server-cert warnings in STDERR#231

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/improve-mariadb-tests
Draft

Fix MariaDB test failures caused by ssl-verify-server-cert warnings in STDERR#231
Copilot wants to merge 3 commits intomainfrom
copilot/improve-mariadb-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 27, 2026

MariaDB 11.4+ prints WARNING: option --ssl-verify-server-cert is disabled, because of an insecure passwordless login. to STDERR whenever WP-CLI invokes mysql/mysqldump using MYSQL_PWD over a TCP connection. This contaminates STDERR and causes Behat steps using When I run to throw RuntimeException, failing most MariaDB tests.

The warning fires only when all of these conditions are true: MYSQL_PWD is set, ssl-verify-server-cert is not explicitly configured (bypassed by --no-defaults), and the protocol is TCP. The existing [client] disable-ssl-verify-server-cert in my-cnf was also ineffective since --no-defaults bypasses all config files.

Changes

  • Removed the ineffective [client] disable-ssl-verify-server-cert lines from my-cnf (were always bypassed by --no-defaults)
  • New step: Configure MariaDB to connect via Unix socket — runs only when inputs.dbtype == 'mariadb'; overrides WP_CLI_TEST_DBHOST to use the Unix socket path instead of TCP:
echo "WP_CLI_TEST_DBHOST=localhost:${{ steps.setup-mysql.outputs.base-dir }}/tmp/mysql.sock" >> "$GITHUB_ENV"

WP-CLI already handles the localhost:/path/to/socket format in mysql_host_to_cli_args(), extracting the socket path and passing --socket=... to mysql/mysqldump. Since Unix socket is not TCP, the MariaDB warning condition is never met and no warning is printed — for every mysql tool call made during the test run.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix MariaDB tests to pass SSL verification Fix MariaDB test failures caused by ssl-verify-server-cert warnings in STDERR Mar 27, 2026
Copilot AI requested a review from swissspidy March 27, 2026 09:48
@swissspidy
Copy link
Copy Markdown
Member

…er-cert warnings

Agent-Logs-Url: https://github.com/wp-cli/.github/sessions/ffe107ab-bf0d-425c-b414-3366b78154ce

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 27, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request scope:testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants