Skip to content

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

Closed
desrosj wants to merge 1 commit into
fix-actions-5.5/create-wp-env-databasesfrom
fix-actions-5.5/replace-db-check-with-healthcheck
Closed

desrosj wants to merge 1 commit into
fix-actions-5.5/create-wp-env-databasesfrom
fix-actions-5.5/replace-db-check-with-healthcheck

Conversation

@desrosj

@desrosj desrosj commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

What?

Ports WordPress#75046 ("wp-env: Fix MySQL startup race condition causing database connection errors") to this branch's wp-env:

  • The mysql and tests-mysql services get a health check, and wordpress / tests-wordpress wait for it with condition: service_healthy. MARIADB_AUTO_UPGRADE is set so existing databases get the user the check needs.
  • wp-env start no longer runs wp db check with its retry loop and extra sleep.
  • CHANGELOG entry from trunk, and the README's note on MariaDB before 11.4 now says wp-env start isn't affected.

Why?

wp db check runs the MariaDB client in the wordpress:cli image (11.8), which requires TLS, and WP-CLI passes --no-defaults, so it can't be turned off. MariaDB before 11.4 doesn't offer TLS by default, so with the 10.5 pin from #623 (directly above) wp-env start would stop with TLS/SSL error: SSL is required, but the server does not support it. Trunk dropped wp db check for a health check that doesn't use the client at all.

How?

depends_on, start and clean follow WordPress#75046 hunk for hunk, adapted to this branch's files. The health check itself is WordPress#83751's, because running healthcheck.sh unconditionally fails on some versions WP_ENV_MARIADB_VERSION (#576) can select: 10.2 and 10.3 lack the healthcheck user, and images from before 2022 (and old patch tags like 10.5.8) lack the script. It runs healthcheck.sh only when both the script and .my-healthcheck.cnf exist, and otherwise pings over TCP on 127.0.0.1 with mariadb-admin or mysqladmin.

Testing

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 this pull request to stack #558 September 30, 2026 10:38
@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-5.5/replace-db-check-with-healthcheck branch from 908c569 to 062824d Compare October 5, 2026 20:44
@desrosj
desrosj force-pushed the fix-actions-5.5/replace-db-check-with-healthcheck branch 2 times, most recently from 1b7a0a9 to 71a50db Compare October 6, 2026 15:46
@desrosj
desrosj removed this pull request from stack #558 October 6, 2026 16:14
@desrosj
desrosj changed the base branch from fix-actions-5.5/add-mariadb-version-option to fix-actions-5.5/create-wp-env-databases October 6, 2026 16:14
@desrosj
desrosj added this pull request to stack #632 October 6, 2026 16:15
@desrosj
desrosj force-pushed the fix-actions-5.5/replace-db-check-with-healthcheck branch from 71a50db to e4bdf08 Compare October 8, 2026 18:08
@desrosj
desrosj removed this pull request from stack #632 October 8, 2026 18:10
@desrosj
desrosj force-pushed the fix-actions-5.5/replace-db-check-with-healthcheck branch from e4bdf08 to a9a5613 Compare October 8, 2026 18:11
@desrosj
desrosj added this pull request to stack #692 October 8, 2026 18:11
@desrosj
desrosj removed this pull request from stack #692 October 9, 2026 19:59
@desrosj
desrosj changed the base branch from fix-actions-5.5/create-wp-env-databases to wp/5.5 October 9, 2026 20:00
@desrosj
desrosj force-pushed the fix-actions-5.5/replace-db-check-with-healthcheck branch from a9a5613 to a7483bf Compare October 9, 2026 20:01
@desrosj
desrosj changed the base branch from wp/5.5 to fix-actions-5.5/create-wp-env-databases October 9, 2026 20:02
@desrosj
desrosj added this pull request to stack #723 October 9, 2026 20:02
@desrosj
desrosj marked this pull request as ready for review October 16, 2026 17:25
@github-actions

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 removed this pull request from stack #723 October 16, 2026 17:36
@desrosj
desrosj added this pull request to stack #739 October 16, 2026 17:36
@desrosj
desrosj force-pushed the fix-actions-5.5/replace-db-check-with-healthcheck branch from a7483bf to c4f6c68 Compare October 16, 2026 17:47
@desrosj

desrosj commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

Moved to WordPress#85010.

@desrosj desrosj closed this Oct 16, 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