Build/Test Tools: Add a start period to the MySQL healthcheck on the 6.9 branch. - #12772
Closed
adimoldovan wants to merge 1 commit into
Closed
Build/Test Tools: Add a start period to the MySQL healthcheck on the 6.9 branch.#12772adimoldovan wants to merge 1 commit into
adimoldovan wants to merge 1 commit into
Conversation
Without `start_period`, Docker counts the checks that run while the database initializes against the retry budget of `interval` x `retries`, which is 50 seconds. A first start of a cold volume that takes longer than that marks the container unhealthy, and every service that declares `mysql: condition: service_healthy` fails to start. A failed check inside the start period does not increment the failure streak, and the first check that passes marks the container healthy at once, so this does not slow down a normal start. Merges [62937] to the 6.9 branch. See #65752.
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
lancewillett
approved these changes
Jul 30, 2026
johnbillion
approved these changes
Jul 30, 2026
pento
pushed a commit
that referenced
this pull request
Jul 30, 2026
Merges [62937] to the 6.9 branch. Developed in: #12772 Reviewed by: johnbillion. Props adrianmoldovanwp. See #65752. git-svn-id: https://develop.svn.wordpress.org/branches/6.9@62947 602fd350-edb4-49c9-b593-d223f7449a82
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.
Backport of r62937 to the 6.9 branch. Developed in #12753.
The
mysqlhealthcheck setsinterval,timeout, andretries, but notstart_period. Docker therefore counts the checks that run while the database initializes against the retry budget ofinterval×retries, which is 50 seconds.The first start of a database volume creates the data directory and runs the files in
/docker-entrypoint-initdb.d. On a loaded CI runner that work can take longer than 50 seconds. Docker then marks the container unhealthy, every service that declaresmysql: condition: service_healthyfails to start, anddocker compose upfails:Example run: https://github.com/WordPress/wordpress-develop/actions/runs/30439797855/job/90536164263
This patch adds
start_period: 60s.Testing instructions
The failure needs a first start that takes more than 50 seconds. A fast machine initializes the volume in about 10 seconds, so the failure does not appear locally. Measure the margin instead:
Repeat the
inspectcommand and record how long the container staysstarting. Compare that time to the 50 second budget.Then confirm that the start period does not delay a healthy start: on this branch the container still reports
healthyat the same point it did before, not 60 seconds later.Trac ticket: https://core.trac.wordpress.org/ticket/65752
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.