Skip to content

fix(supported-version): use healthcheck.sh for MariaDB service container#366

Closed
rhoerr wants to merge 3 commits into
mage-os:mainfrom
rhoerr:fix/mariadb-11-healthcheck
Closed

fix(supported-version): use healthcheck.sh for MariaDB service container#366
rhoerr wants to merge 3 commits into
mage-os:mainfrom
rhoerr:fix/mariadb-11-healthcheck

Conversation

@rhoerr
Copy link
Copy Markdown
Contributor

@rhoerr rhoerr commented May 14, 2026

Summary

  • Replace the mysqladmin ping health check in the MySQL service-container template with healthcheck.sh --connect --innodb_initialized. The mysqladmin binary was removed from the official mariadb:11.4 image (used by Magento 2.4.9), causing the setup-install lane for 2.4.9 to fail at "Initialize containers" even though MariaDB itself was up. healthcheck.sh ships in both mariadb:10.6 and mariadb:11.4, so a single template covers every currently-supported lane.
  • Update the corresponding assertion in build-services.spec.ts and rebuild dist/.
  • Sync the root package-lock.json with package.json (pre-existing drift: root deps declared @actions/exec@^3.0.0, lock was still on 1.1.1). Without this, the Test Actions workflow's npm ci step fails on any PR that touches supported-version/**.

Fixes #365

Test plan

  • npx jest in supported-version/ — all 111 tests pass
  • npm run build regenerates dist/index.js
  • npm install --package-lock-only produces a clean lock diff
  • CI setup-install (magento/project-community-edition:2.4.9) lane passes on this PR
  • Test Actions unit-test job passes on this PR

…ealthcheck.sh

The official mariadb:11.4 image (used by Magento 2.4.9) no longer ships
the mysqladmin binary, so the service-container health command always
exits non-zero and the job fails at "Initialize containers". Switch to
the bundled healthcheck.sh, which is present in both mariadb:10.6 and
mariadb:11.4 — covering every currently-supported lane.

Fixes mage-os#365
@rhoerr rhoerr requested a review from a team as a code owner May 14, 2026 04:06
rhoerr added 2 commits May 14, 2026 00:09
Root package.json declares @actions/exec@^3.0.0, but the lock file was
still pinned to 1.1.1, causing `npm ci` in the Test Actions workflow to
fail on any PR that touches supported-version/**. Regenerated via
`npm install --package-lock-only` to bring the lock in line.
The previous attempt at a universal healthcheck broke the upstream MySQL
lanes (mysql:8.0, mysql:8.4, etc.) because healthcheck.sh is shipped
only by the official MariaDB image. Detect the image prefix and use
healthcheck.sh for mariadb:* and mysqladmin ping for everything else.
@damienwebdev
Copy link
Copy Markdown
Member

damienwebdev commented May 14, 2026

@rhoerr I'm not a huge fan of this. I'd prefer if we could define mysql and mariadb separately and then much like we do with opensearch and elasticsearch swap to the "preferred" version if supported.

That said, we do need an answer to #14 because I use mysql and others use mariadb

@rhoerr rhoerr closed this May 15, 2026
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.

CI fails for Magento 2.4.9: mariadb:11.4 healthcheck uses removed mysqladmin binary

2 participants