Skip to content

Repair wp/5.4 branch Actions: Replace wp-env's database check with a MariaDB health check - #85606

Merged
desrosj merged 1 commit into
fix-actions-5.4/add-mariadb-version-optionfrom
fix-actions-5.4/replace-db-check-with-healthcheck
Oct 29, 2026
Merged

desrosj merged 1 commit into
fix-actions-5.4/add-mariadb-version-optionfrom
fix-actions-5.4/replace-db-check-with-healthcheck

Conversation

@desrosj

@desrosj desrosj commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Part of #83419.

What?

wp-env waits for the database with a Docker health check instead of running wp db check. A port of #75046, using the health check command from #83751.

Why?

wp db check runs the MariaDB client in the cli container. The current wordpress:cli image ships a client (MariaDB 11.8) that requires TLS, and WP-CLI gives no way to turn that off. MariaDB servers before 11.4 don't offer TLS unless configured, so the check fails (SSL is required, but the server does not support it) and wp-env start stops. WP_ENV_MARIADB_VERSION (#85605) can now select one of those servers, and wp-env start fails for anyone who does.

trunk fixed this in #75046 by removing wp db check and waiting for a health check, which doesn't use the client at all.

How?

#75046 is ported hunk for hunk, adapted to this branch's wp-env (one shared mysql service, so it alone gets the health check and both WordPress services wait for it). The health check command comes from #83751 instead, because it works with every MariaDB version WP_ENV_MARIADB_VERSION can select: it uses MariaDB's healthcheck.sh where the image supports it, and otherwise pings the server. packages/env/CHANGELOG.md gets trunk's entry, and the README note about older MariaDB servers mentions that wp-env start is no longer affected.

Testing Instructions

packages/env's tests run in the JavaScript job on this pull request. The CI workflows on this branch use wordpress-develop's environment rather than wp-env, so the rest was verified locally: packages/env's tests pass, and the generated database service becomes healthy on mariadb:10.4 (through healthcheck.sh) and on mariadb:10.3 (through the ping fallback).

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 [Type] Build Tooling Issues or PRs related to build tooling [Tool] Env /packages/env labels Oct 26, 2026
@desrosj desrosj self-assigned this Oct 26, 2026
@coderabbitai

coderabbitai Bot commented Oct 26, 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: 80a06934-18a2-4482-ad47-762abbc6dd8e

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 27, 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: andrewserong <andrewserong@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.

@andrewserong andrewserong 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.

This looks like a good port of #75046 and #83751 for this branch to me 👍

In the PR description it mentions that this PR pins to mariadb 10.4, but it doesn't seem to. Was that intended here, or in another PR?

Not a blocker to this PR in the stack of course, just thought I'd check.

LGTM!

@desrosj
desrosj force-pushed the fix-actions-5.4/replace-db-check-with-healthcheck branch from db02ce3 to 2ab7599 Compare October 29, 2026 12:48
@desrosj
desrosj merged commit a41862e into wp/5.4 Oct 29, 2026
6 of 14 checks passed
@desrosj
desrosj deleted the fix-actions-5.4/replace-db-check-with-healthcheck branch October 29, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Tool] Env /packages/env [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