Skip to content

Repair wp/6.2 branch Actions: Detect the database client in the debug step - #590

Closed
desrosj wants to merge 1 commit into
fix-actions-6.2/add-mariadb-version-optionfrom
fix-actions-6.2/detect-db-client-in-debug-step
Closed

desrosj wants to merge 1 commit into
fix-actions-6.2/add-mariadb-version-optionfrom
fix-actions-6.2/detect-db-client-in-debug-step

Conversation

@desrosj

@desrosj desrosj commented Sep 30, 2026

Copy link
Copy Markdown
Owner

What?

Makes the database line of unit-test.yml's "Docker container debug information" step work with any MySQL or MariaDB version. It now runs mariadb --version when the database container has a mariadb client, and mysql --version when it doesn't.

Why?

The client's name depends on the database version, and this branch supports MySQL and MariaDB back to 5.5:

  • MariaDB 5.5–10.3 and every MySQL version only have mysql.
  • MariaDB 10.4–10.11 have both.
  • MariaDB 11.0 and later only have mariadb: the mysql alias 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 -c script inside the tests-mysql container. This branch's wp-env passes a run command to the host shell as a single line, so the script is wrapped in single quotes inside the command string to reach the container intact.

Tested this branch's wp-env run argument handling (Node.js 14, npm 6) against MariaDB 5.5, 10.3, 10.11 and 13.0 and MySQL 5.7 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.

@desrosj
desrosj added this pull request to stack #573 September 30, 2026 03:16
@github-actions

Copy link
Copy Markdown

🤖 PR meta 🤖

🏷️ Labels

This pull request needs exactly one label indicating its type, and has 0.

  • Required: any label starting with [Type].
  • Found: none.

Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you.

@desrosj
desrosj force-pushed the fix-actions-6.2/detect-db-client-in-debug-step branch from da93f6c to 22b4ac9 Compare October 5, 2026 20:44
@desrosj
desrosj force-pushed the fix-actions-6.2/detect-db-client-in-debug-step branch from 22b4ac9 to 82f7b22 Compare October 5, 2026 20:50
@desrosj
desrosj removed this pull request from stack #573 October 6, 2026 23:39
@desrosj
desrosj changed the base branch from fix-actions-6.2/pin-mariadb-version to wp/6.2 October 6, 2026 23:40
@desrosj
desrosj force-pushed the fix-actions-6.2/detect-db-client-in-debug-step branch from 82f7b22 to 598fe99 Compare October 6, 2026 23:40
@desrosj
desrosj changed the base branch from wp/6.2 to fix-actions-6.2/add-mariadb-version-option October 6, 2026 23:44
@desrosj
desrosj added this pull request to stack #637 October 6, 2026 23:44
@desrosj
desrosj removed this pull request from stack #637 October 7, 2026 17:51
@desrosj
desrosj changed the base branch from fix-actions-6.2/add-mariadb-version-option to wp/6.2 October 7, 2026 17:52
@desrosj
desrosj force-pushed the fix-actions-6.2/detect-db-client-in-debug-step branch from 598fe99 to b3f796b Compare October 7, 2026 17:54
@desrosj
desrosj changed the base branch from wp/6.2 to fix-actions-6.2/add-mariadb-version-option October 7, 2026 17:55
@desrosj
desrosj added this pull request to stack #666 October 7, 2026 17:56
@desrosj
desrosj marked this pull request as ready for review October 8, 2026 03:19
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: desrosj <desrosj@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@desrosj

desrosj commented Oct 8, 2026

Copy link
Copy Markdown
Owner Author

Moved to WordPress#84233.

@desrosj desrosj closed this Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant