Skip to content

fix(ci): the apk drift check defaults to a Docker Hub mirror when the engine configures none - #158

Open
antoinetoussaint-byte wants to merge 1 commit into
mainfrom
fix/apk-check-mirror-and-smoke-literal
Open

antoinetoussaint-byte wants to merge 1 commit into
mainfrom
fix/apk-check-mirror-and-smoke-literal

Conversation

@antoinetoussaint-byte

@antoinetoussaint-byte antoinetoussaint-byte commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Rebased onto e5455c2 (v0.0.74) and reduced to the one hunk main does not already carry. The smoke-literal tightening this PR first proposed landed in #128's reconcile as a line-anchored regex (^…docker run … go version | grep -F 'go1.27.3'…$), which a comment cannot satisfy — superseded, dropped.

What remains: the runner has no mirror

47cfb21 made refresh-apk-pins.sh pull the Go base from the engine's configured HTTPS mirror (docker info … .RegistryConfig.Mirrors). A GitHub-hosted runner configures none, so on the one host that runs this weekly the script still pulls docker.io — and from the runners' shared IPs that is the toomanyrequests class: apk-pin-drift would red on a rate limit rather than on drift, a check red about the wrong thing. With no engine mirror the default is now mirror.gcr.io; DOCKER_HUB_MIRROR overrides both. The reference is digest-pinned, so the mirror serves the identical bytes; Docker's ordered fallback through the original reference is unchanged.

Proven by execution (exit codes read directly, no pipes)

path result
engine with a mirror (local OrbStack → mirror.gcr.io) exit 0, six pins current, pulled mirror.gcr.io/library/golang@…
DOCKER_HUB_MIRROR=https://mirror.invalid mirror pull fails, Docker's fallback resolves all six, exit 0
docker shim whose info reports no mirror (the runner case) this script pulls mirror.gcr.io/library/golang@sha256:895e…, exit 0; main's script under the same shim never touches a mirror (0 mentions) → docker.io

Classification: fix at the owner (the script that resolves). Reuse: 47cfb21's mirror pull and fallback shape, unchanged; the digest already in ARG GO_IMAGE. Deliberately not done: no change to apk-pin-drift.yml; no mirror for ci.yml/runtime-image.yml's own BuildKit pulls (a different change).

Not verified: a run on an actual GitHub runner; the no-mirror path was exercised through a shim, not a reconfigured engine.

🤖 Generated with Claude Code

… engine configures none

47cfb21 made refresh-apk-pins.sh pull the runtime image's Go base from the
engine's configured HTTPS mirror. A GitHub-hosted runner configures none, so
on the one host that runs this weekly the script still pulled docker.io, and
from the runners' shared IPs Docker Hub answers `toomanyrequests` often enough
that apk-pin-drift would go red about a rate limit instead of about drift.

With no engine mirror, the default is now mirror.gcr.io; DOCKER_HUB_MIRROR
overrides both. The reference is pinned by digest, so the mirror serves the
identical bytes, and Docker's ordered fallback through the original reference
is unchanged when the mirror pull fails.

Proven by execution: engine with a mirror (exit 0, mirror.gcr.io used);
DOCKER_HUB_MIRROR=https://mirror.invalid (pull fails, fallback resolves all six
pins, exit 0); a docker shim whose `info` reports no mirror (this script pulls
mirror.gcr.io/library/golang@sha256:895e…; main's script under the same shim
never touches a mirror).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@antoinetoussaint-byte antoinetoussaint-byte changed the title fix(ci): the apk drift check asks a mirror, and the smoke literal is read from the grep itself fix(ci): the apk drift check defaults to a Docker Hub mirror when the engine configures none Oct 27, 2026
@antoinetoussaint-byte
antoinetoussaint-byte force-pushed the fix/apk-check-mirror-and-smoke-literal branch from 8a8a64c to 8063ba8 Compare October 27, 2026 23:01
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.

1 participant