Skip to content

Support Pantheon MySQL 8.4 - #375

Open
AaronFeledy wants to merge 6 commits into
mainfrom
feat/pantheon-mysql-84
Open

AaronFeledy wants to merge 6 commits into
mainfrom
feat/pantheon-mysql-84

Conversation

@AaronFeledy

@AaronFeledy AaronFeledy commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds opt-in MySQL 8.4 via database.type: mysql and database.version: 8.4. MariaDB remains the default, including existing version and ARM paths. Invalid combinations fail with an actionable error.

  • Uses the existing MySQL 8.4 service with Pantheon credentials and a dedicated server config: utf8mb4, utf8mb4_0900_ai_ci, and READ-COMMITTED.
  • Removes the global appserver TLS exception. Pull/push probe each local client and apply the MariaDB verification option only to local MySQL 8.4 connections. Oracle clients do not receive MariaDB flags; remote commands and TLS arguments from Terminus remain unchanged.
  • Propagates the effective database service type, including Landofile overrides, to pull/push/switch.
  • Adds --no-tablespaces only to local MySQL 8.4 dumps.
  • Stages source dumps before importing. Failed source dumps are not imported or pushed; pull can retry through its remote dump fallback. Import and pipeline failures stop the sync. Staging requires temporary disk space.
  • Does not upgrade appserver images or migrate volumes. Switching engines requires recreating local database storage and importing data again.

Fixes #374

Verification

  • npm test: 84 passing, 1 existing pending, including local/remote flag separation, client capabilities, service overrides, fallback, quoting, and failure propagation.
  • All scripts/*.sh pass bash -n; git diff --check passes.
  • Real Docker: MySQL 8.4.5 with Pantheon appserver 8.4-5 / MariaDB 11.4.9; query, import, full dump/restore, checksummed 300 rows, Unicode/binary values, view/trigger, and native failures.
  • Actual MariaDB 10.6.20, MariaDB 10.11.11, and Oracle 8.4.5 clients query/dump successfully. Oracle restores the MariaDB-generated dump.
  • Actual pull/push scripts exercised against disposable local schemas, including fallback, failure, and recovery. Terminus/auth were mocked, so this is not a real Pantheon-hosted sync.
  • Slop pass: no wording cuts. Local Cursor Bugbot review of bd2254a: no bugs found.

Leia integration coverage

  • Added local-only examples/pantheon-mysql84 and wired both 3-stable and 3-edge CI cells, with explicit MySQL plugin 1.6.0 provisioning.
  • Actual Leia run: 8 passing (47s) on core 3.26.9, PHP plugin 1.12.0, pristine MySQL plugin 1.6.0, and this Pantheon checkout.
  • Checks real server MySQL 8.4/defaults, non-root PDO connectivity and exact Unicode rows, local helper dump/restore, and recipe db-export/db-import round-trip. Teardown affects only this example; no global poweroff.
  • Independent Astra review approved the implementation. Its misleading release-prerequisite documentation finding was corrected in 16d2605.
  • Local success is not a claim that both GitHub CI matrix cells have passed; real remote Pantheon synchronization remains unverified.

Limits and follow-up

  • No disposable Pantheon environment was supplied; real remote synchronization remains unverified.
  • Drush and arbitrary appserver commands are not covered by this local sync workaround. Selecting MySQL does not upgrade old client binaries or fix all authentication/collation compatibility.
  • Shared PHP client provisioning through updated Pantheon images is a separate change. Current generation-5 images lack the bundled Oracle clients.

Bare minimum self-checks

  • I've updated this PR with the latest code from main
  • I've done a cursory QA pass of my code locally
  • I've ensured all automated status check and tests pass
  • I've connected this PR to an issue

Pieces of flare

  • I've written a unit or functional test for my code
  • I've updated relevant documentation it my code changes it
  • I've updated this repo's README if my code changes it
  • I've updated this repo's CHANGELOG with my change unless its a trivial change (like updating a typo in the docs)

Finally


Note

Medium Risk
Changes core database sync (pull/push) and engine selection; mistakes could corrupt local DBs or break remote sync, though behavior is heavily tested and scoped to MySQL 8.4 compatibility paths.

Overview
Adds opt-in MySQL 8.4 when pantheon.yml sets database.type: mysql and database.version: 8.4; MariaDB stays the default, with validation errors for invalid combinations. The recipe selects mysql:8.4, applies a new mysql84.cnf (utf8mb4, utf8mb4_0900_ai_ci, READ-COMMITTED), and passes the effective service type—including Landofile overrides—to lando pull, push, and switch via LANDO_DB_SERVICE_TYPE.

Pull/push now finish dumps to a temp file before import (pipefail), retry pull’s remote mysqldump fallback without importing partial SQL, and use pantheon-local-database.sh to add MariaDB-only local flags (--ssl-verify-server-cert=0, --no-tablespaces on dump) only for local MySQL 8.4; Terminus remote TLS/commands are unchanged.

Docs/CHANGELOG, a local-only Leia example (examples/pantheon-mysql84), CI matrix + explicit @lando/mysql@1.6.0 install, and unit/integration tests cover selection, client probing, and failure propagation.

Reviewed by Cursor Bugbot for commit de0d038. Bugbot is set up for automated code reviews on this repo. Configure here.

AaronFeledy and others added 2 commits October 27, 2026 16:32
Read database.type from pantheon.yml. type: mysql with version 8.4
now runs the stock mysql:8.4 service (bitnamilegacy/mysql:8.4.5,
which publishes amd64 and arm64, so no ARM builder). Any other mysql
version, or 8.4 without type: mysql, fails lando start with an error.
No type keeps pantheon-mariadb(-arm), default 10.3.

MySQL gets config/mysql84.cnf (utf8mb4, utf8mb4_0900_ai_ci, no
sql_mode). The MariaDB mysql.cnf is fatal on 8.4 and is unchanged.

The gen 5 appserver ships a MariaDB 11.4 client, which rejects the
self-signed cert MySQL 8.4 generates, so pull and push fail.
mysql_native_password does not fix that, so the appserver mounts
config/mysql84-client.cnf with ssl-verify-server-cert=0 under
[client-mariadb] when the engine is mysql. PHP mysqlnd connects
without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MySQL 8.4 defaults to REPEATABLE-READ. The MariaDB cnf sets
READ-COMMITTED in a [mariadb] group, which this server ignores, so
Drupal 10+ would warn after switching engines.
@netlify

netlify Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for lando-pantheon failed. Why did it fail? →

Name Link
🔨 Latest commit de0d038
🔍 Latest deploy log https://app.netlify.com/projects/lando-pantheon/deploys/6ae18cfce720627a7340f13d

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit bd2254a. Configure here.

Comment thread scripts/pantheon-local-database.sh Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Pantheon MySQL 8.4 (database.type: mysql)

1 participant