Skip to content

Repair wp/7.1 branch Actions: Detect the database client in the debug step - #83831

Merged
desrosj merged 1 commit into
fix-actions-7.1/pin-mariadb-versionfrom
fix-actions-7.1/detect-db-client-in-debug-step
Oct 26, 2026
Merged

desrosj merged 1 commit into
fix-actions-7.1/pin-mariadb-versionfrom
fix-actions-7.1/detect-db-client-in-debug-step

Conversation

@desrosj

@desrosj desrosj commented Sep 30, 2026

Copy link
Copy Markdown
Member

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 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 in the mysql container (the tests database of wp-env-test). The -- before sh passes the script to the container without wp-env parsing 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

@desrosj desrosj added the [Type] Build Tooling Issues or PRs related to build tooling label Sep 30, 2026
@desrosj desrosj self-assigned this Sep 30, 2026
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 052acddc-9c4f-409a-9678-98cbb646de9d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

📦 Bundle size

Size Change: 0 B

Total Size: 7.75 MB

From b11ab3c, not the current head. Run

🏁 Flaky tests

Some 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 /test/e2e/specs/editor/blocks/image.spec.js, passed after 2 failed attempts.
TimeoutError: locator.dragTo: Timeout 10000ms exceeded.
Call log:
  - waiting for getByRole('region', { name: 'Block Library' }).getByRole('listbox', { name: 'Media List' }).getByRole('option').first()

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/image.spec.js:359:5
TimeoutError: locator.dragTo: Timeout 10000ms exceeded.
Call log:
  - waiting for getByRole('region', { name: 'Block Library' }).getByRole('listbox', { name: 'Media List' }).getByRole('option').first()

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/image.spec.js:359:5

From 6360f55, not the current head. Run

@desrosj
desrosj marked this pull request as ready for review October 7, 2026 13:02
@github-actions

github-actions Bot commented Oct 7, 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.

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>
Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>

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


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@desrosj
desrosj force-pushed the fix-actions-7.1/detect-db-client-in-debug-step branch from 7c195ac to 747c4fe Compare October 7, 2026 13:42
@desrosj
desrosj force-pushed the fix-actions-7.1/detect-db-client-in-debug-step branch from 747c4fe to 99411ba Compare October 7, 2026 15:55
@desrosj
desrosj removed this pull request from stack #83629 October 8, 2026 21:07
@desrosj
desrosj changed the base branch from fix-actions-7.1/pin-mariadb-version to wp/7.1 October 8, 2026 21:08
@desrosj
desrosj force-pushed the fix-actions-7.1/detect-db-client-in-debug-step branch from 99411ba to 859b901 Compare October 8, 2026 21:08
@github-actions github-actions Bot added the [Tool] Env /packages/env label Oct 8, 2026
@desrosj
desrosj changed the base branch from wp/7.1 to fix-actions-7.1/pin-mariadb-version October 8, 2026 21:09
@desrosj
desrosj added this pull request to stack #84346 October 8, 2026 21:10
@desrosj
desrosj removed this pull request from stack #84346 October 9, 2026 23:21
@desrosj
desrosj changed the base branch from fix-actions-7.1/pin-mariadb-version to wp/7.1 October 9, 2026 23:21
@desrosj
desrosj force-pushed the fix-actions-7.1/detect-db-client-in-debug-step branch from 859b901 to b11ab3c Compare October 9, 2026 23:22
@desrosj
desrosj changed the base branch from wp/7.1 to fix-actions-7.1/pin-mariadb-version October 9, 2026 23:23
@desrosj
desrosj added this pull request to stack #84466 October 9, 2026 23:23
@desrosj desrosj removed the [Tool] Env /packages/env label Oct 16, 2026
@desrosj
desrosj force-pushed the fix-actions-7.1/detect-db-client-in-debug-step branch from b11ab3c to 6360f55 Compare October 19, 2026 17:02
@desrosj
desrosj removed this pull request from stack #84466 October 21, 2026 18:35
@desrosj
desrosj added this pull request to stack #85326 October 21, 2026 18:36
@desrosj
desrosj force-pushed the fix-actions-7.1/detect-db-client-in-debug-step branch from 6360f55 to d63038f Compare October 24, 2026 18:02
@desrosj
desrosj removed this pull request from stack #85326 October 24, 2026 18:04
@desrosj
desrosj added this pull request to stack #85508 October 24, 2026 18:04

@ntsekouras ntsekouras left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks!

@desrosj
desrosj force-pushed the fix-actions-7.1/detect-db-client-in-debug-step branch from d63038f to 0f3caa4 Compare October 26, 2026 17:58
@desrosj desrosj added the props-bot Manually triggers Props Bot to ensure the list of props is up to date. label Oct 26, 2026
@github-actions github-actions Bot removed the props-bot Manually triggers Props Bot to ensure the list of props is up to date. label Oct 26, 2026
@desrosj
desrosj merged commit 30ca2ff into wp/7.1 Oct 26, 2026
60 of 96 checks passed
@desrosj
desrosj deleted the fix-actions-7.1/detect-db-client-in-debug-step branch October 26, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants