Skip to content

Repair wp/5.6 branch Actions: Add a WP_ENV_MARIADB_VERSION environment variable - #575

Closed
desrosj wants to merge 1 commit into
fix-actions-5.6/fix-puppeteer-alias-lockfile-driftfrom
fix-actions-5.6/add-mariadb-version-option
Closed

desrosj wants to merge 1 commit into
fix-actions-5.6/fix-puppeteer-alias-lockfile-driftfrom
fix-actions-5.6/add-mariadb-version-option

Conversation

@desrosj

@desrosj desrosj commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

What?

Adds a WP_ENV_MARIADB_VERSION environment variable that chooses the MariaDB version wp-env uses. The database image in packages/env/lib/build-docker-compose-config.js changes from 'mariadb' to 'mariadb:${WP_ENV_MARIADB_VERSION:-latest}'. When the variable isn't set, the image resolves to mariadb:latest, the same image as before.

The README gets a note next to the existing port-variable note. Besides the variable, it says that MariaDB cannot start on a database written by a newer version, so before switching to a lower version, run wp-env destroy, which removes the environment's Docker containers, volumes, networks, and local files, not only the database. It also says that with a version older than 11.4, wp db commands in the cli and tests-cli containers fail and wp-env clean leaves the database as it is: the MariaDB client in the wordpress:cli image requires TLS, and MariaDB servers before 11.4 do not offer it. WordPress itself is not affected.

packages/env/CHANGELOG.md gets an entry under Unreleased → New Features.

Why?

This branch's wp-env (2.1.0) always runs the floating mariadb image, which today is a MariaDB release many years newer than anything this branch was tested against. There is currently no way to pin an older, era-appropriate version for testing.

How?

This follows #83751, which adds a mariadbVersion option and WP_ENV_MARIADB_VERSION environment variable to trunk. wp-env 2.1.0 has no version settings to extend, so only the environment variable is ported. Docker Compose fills it in when it reads the generated docker-compose.yml, the same way this file already uses WP_ENV_PORT/WP_ENV_TESTS_PORT in the port mappings and LOCAL_PHP in the phpunit image.

This branch's wp-env runs one mysql service for both the development and tests environments, so a single image line changes.

A new test in packages/env/test/build-docker-compose-config.js checks the generated image string. npm run test-unit -- packages/env passes all 63 tests locally. (packages/env/test/cli.js couldn't load locally because nodegit's native module wasn't built; that's unrelated to this change.)

Pinning the version doesn't by itself fix the mariadb-check TLS error that wp-env start can hit on this branch; that is a separate problem.

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.

@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 added this pull request to stack #557 September 29, 2026 13:20
@desrosj
desrosj force-pushed the fix-actions-5.6/add-mariadb-version-option branch 2 times, most recently from dc6ec72 to a4c6d11 Compare October 5, 2026 20:51
@desrosj
desrosj removed this pull request from stack #557 October 6, 2026 16:14
@desrosj
desrosj added this pull request to stack #631 October 6, 2026 16:14
@desrosj
desrosj force-pushed the fix-actions-5.6/add-mariadb-version-option branch from a4c6d11 to e0343e4 Compare October 7, 2026 13:03
@desrosj
desrosj removed this pull request from stack #631 October 7, 2026 18:05
@desrosj
desrosj changed the base branch from fix-actions-5.6/fix-react-native-screens-git-dependency to wp/5.6 October 7, 2026 18:06
@desrosj
desrosj force-pushed the fix-actions-5.6/add-mariadb-version-option branch from e0343e4 to 915aa5f Compare October 7, 2026 18:07
@desrosj
desrosj changed the base branch from wp/5.6 to fix-actions-5.6/fix-react-native-screens-git-dependency October 7, 2026 18:08
@desrosj
desrosj added this pull request to stack #670 October 7, 2026 18:08
@desrosj
desrosj force-pushed the fix-actions-5.6/add-mariadb-version-option branch from 915aa5f to 7ddd2fe Compare October 8, 2026 17:41
@desrosj
desrosj removed this pull request from stack #670 October 8, 2026 18:01
@desrosj
desrosj force-pushed the fix-actions-5.6/add-mariadb-version-option branch from 7ddd2fe to 524ac65 Compare October 8, 2026 18:01
@desrosj
desrosj changed the base branch from fix-actions-5.6/fix-react-native-screens-git-dependency to fix-actions-5.6/fix-puppeteer-alias-lockfile-drift October 8, 2026 18:01
@desrosj
desrosj added this pull request to stack #690 October 8, 2026 18:01
@desrosj
desrosj force-pushed the fix-actions-5.6/add-mariadb-version-option branch 2 times, most recently from 6d6d57b to 40f6583 Compare October 9, 2026 15:50
@desrosj
desrosj force-pushed the fix-actions-5.6/add-mariadb-version-option branch from 40f6583 to 788d5e2 Compare October 9, 2026 15:54
@desrosj
desrosj removed this pull request from stack #690 October 9, 2026 19:56
@desrosj
desrosj changed the base branch from fix-actions-5.6/fix-puppeteer-alias-lockfile-drift to wp/5.6 October 9, 2026 19:56
@desrosj
desrosj force-pushed the fix-actions-5.6/add-mariadb-version-option branch from 788d5e2 to fcc0d72 Compare October 9, 2026 19:57
@desrosj
desrosj changed the base branch from wp/5.6 to fix-actions-5.6/fix-puppeteer-alias-lockfile-drift October 9, 2026 19:59
@desrosj
desrosj added this pull request to stack #721 October 9, 2026 19:59
@desrosj
desrosj removed this pull request from stack #721 October 16, 2026 01:09
@desrosj
desrosj force-pushed the fix-actions-5.6/add-mariadb-version-option branch from fcc0d72 to 0a2014b Compare October 16, 2026 01:09
@desrosj
desrosj added this pull request to stack #727 October 16, 2026 01:10
@desrosj
desrosj marked this pull request as ready for review October 16, 2026 14:14
@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 commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

Moved to WordPress#84970.

@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