ci: fix MySQL 8 service container health check in Magento compatibility workflow#183
Merged
Conversation
Agent-Logs-Url: https://github.com/OpenForgeProject/mageforge/sessions/b87cdfde-9f30-4e03-9f65-1afa2d6072fe Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update GitHub Actions workflow to fix MySQL service startup
ci: fix MySQL 8 service container health check in Magento compatibility workflow
May 11, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the Magento Compatibility Test workflow’s MySQL 8 service startup reliability by making the service container health check authenticate explicitly and allowing more startup time before marking the service unhealthy.
Changes:
- Replace the MySQL service health check with an authenticated
mysqladmin pingusing explicit host/credentials. - Increase health check tolerance (retries) and add a start period to accommodate MySQL 8 initialization.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
Magento Compatibility Testworkflow was failing at service container startup because the MySQL health check ran without credentials or explicit host, causing authentication failures against MySQL 8's default auth plugin.Changes
.github/workflows/magento-compatibility.yml— replace the baremysqladmin pinghealth check with an authenticated variant:-h 127.0.0.1 -uroot -pmagento --silentto avoid socket/auth-plugin ambiguity--health-retriesfrom3→10--health-start-period=30sto give MySQL 8 init time before checks beginImage, env vars, and ports are unchanged.
Original prompt
Update the GitHub Actions workflow in repository
OpenForgeProject/mageforgeto fix the failing MySQL service container startup in theMagento Compatibility Testworkflow.Context:
.github/workflows/magento-compatibility.yml1e1bafd824e62ce1ac4603346d5738684997b95bService container mysql failed.Failed to initialize container mysql:8.0One or more containers failed to start.mysql:8.0mysqladmin pingRequested change:
.github/workflows/magento-compatibility.ymlto use a more reliable health check with explicit host and credentials.optionsline for the MySQL service with a folded multi-line options block containing:--health-cmd="mysqladmin ping -h 127.0.0.1 -uroot -pmagento --silent"--health-interval=10s--health-timeout=5s--health-retries=10--health-start-period=30sAcceptance criteria:
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.
Assistant: The failure is in the MySQL service startup, not in MageForge code or Magento install steps.
Root cause
The workflow defines MySQL like this:
.github/workflows/magento-compatibility.ymlThe job log shows:
Service container mysql failed.Failed to initialize container mysql:8.0One or more containers failed to start.The container log also shows MySQL initialization completed, which strongly suggests the problem is the GitHub Actions service container health/startup configuration rather than schema/setup logic. The most likely issue is the health check command:
--health-cmd="mysqladmin ping"For MySQL 8 images, that check is often unreliable without explicit credentials and host, especially once the container has initialized with a root password.
Fix
Update the MySQL service health check to authenticate explicitly and give it a bit more time.
Suggested replacement:
Why this should solve it
-uroot -pmagentomatches the configured root password.-h 127.0.0.1avoids socket/auth ambiguity inside the container.--silentmakes the health check cleaner and more predictable.Recommended patch
In
magento-compatibility.yml, replace the MySQL service block with:Optional hardening
If MySQL 8.0 latest patch behavior keeps shifting, pin to a known-good tag instead of
mysql:8.0, for example:That makes CI more reproducible.
Bottom line
This is a CI service-container startup issue caused by an insufficient MySQL health check. The best solution is to make the health check explicit with credentials/host and increase the startup tolerance.
User: make a pr with the Recommende...
This pull request was created from Copilot chat.