ci: pin and cache the MySQL image to survive Docker Hub outages#19
Closed
erikfrerejean wants to merge 1 commit into
Closed
ci: pin and cache the MySQL image to survive Docker Hub outages#19erikfrerejean wants to merge 1 commit into
erikfrerejean wants to merge 1 commit into
Conversation
The PHP 8.5 PHPUnit job intermittently failed at 'Start services' when Docker Hub timed out pulling the mysql image, cascading into empty test reports. Pin db to mysql:8.4 (LTS, dependabot-trackable) and add a composite action that restores the image from the Actions cache, only pulling from Docker Hub on a miss. Wired into both jobs since the static-analysis job also starts db as a dependency.
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.
Why
The
PHPUnit (PHP 8.5)job intermittently fails at Start services when Docker Hub times out pulling themysqlimage:PHPUnit then never runs, so
coverage/phpunit-junit.xmlis never produced — thecpanddorny/test-reportersteps fail downstream. It's a transient registry outage, not a code problem (8.3/8.4 passed the identical steps).What
dbimagemysql:8→mysql:8.4(LTS) — deterministic and trackable by the existing dependabotdockerecosystem watching/.docker..github/actions/cache-mysql-image— derives the image fromcompose.yml(single source of truth, no drift), restores it from the Actions cache, and only pulls from Docker Hub on a miss (then saves the tarball for next time).up appalso startsdbas a dependency, so it was exposed to the same outage.Behaviour
First run pulls + saves
mysql:8.4; every run after doesdocker loadfrom cache and never touches Docker Hub for the db image. Cache key isdb-image-mysql-8.4, so bumping the pin rotates the cache automatically.Notes
appimage build still pulls its own base from Docker Hub — this only hardens the db pull, which is where the failures occurred. Buildx layer caching would be a separate, larger change.docker compose -f .docker/compose.yml config --images dbreturnsmysql:8.4; both YAML files parse clean.