Repository navigation
Repair wp/7.1 branch Actions: Detect the database client in the debug step - #83831
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
e236291 to
7c195ac
Compare
🤖 PR meta 🤖📦 Bundle sizeSize Change: 0 B Total Size: 7.75 MB From 🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. can be replaced by dragging-and-dropping images from the inserter in
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
7c195ac to
747c4fe
Compare
747c4fe to
99411ba
Compare
99411ba to
859b901
Compare
859b901 to
b11ab3c
Compare
b11ab3c to
6360f55
Compare
6360f55 to
d63038f
Compare
d63038f to
0f3caa4
Compare
Part of #82781.
What?
Makes the database line of
unit-test.yml's "Docker container debug information" step work with any MySQL or MariaDB version. It now runsmariadb --versionwhen the database container has amariadbclient, andmysql --versionwhen it doesn't.Why?
The client's name depends on the database version, and this branch supports MySQL and MariaDB back to 5.5:
mysql.mariadb: themysqlalias was removed.A fixed name fails on part of that range, so the step checks which client exists before running it. WordPress Core's test environment makes the same distinction by version (WordPress/wordpress-develop@ea80ac8).
How?
The line runs a short
sh -cscript in themysqlcontainer (the tests database ofwp-env-test). The--beforeshpasses the script to the container withoutwp-envparsing it.Tested against MariaDB 5.5, 10.0, 10.3, 10.4, 10.5, 10.6, 10.11, 11.4, 11.8, 12.3 and 13.0 and MySQL 5.5, 5.6, 5.7, 8.0 and 8.4: each prints its client version and exits successfully.
Use of AI Tools
This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.
🤖 Generated with Claude Code