Repository navigation
Boot-test the arm64 images before they get a tag - #22
michaelaguiar wants to merge 3 commits into
Conversation
The smoke test ran on the amd64 image only, so an arm64-only break could still reach -latest. - smoke-test.sh takes an optional platform (linux/amd64 or linux/arm64), passes it to every docker run and checks uname -m against it. - The frankenphp build legs boot the arm64 image on their native arm64 runner before uploading its digest. A failure leaves no arm64 digest, so the merge job fails and the tags stay where they were. - The cli images boot their arm64 image under the QEMU the build already uses. - The amd64 checks pass linux/amd64, so they check the architecture too. Refs ALI-1113
- A failed --platform pre-pull was silenced, so a registry error showed up later as a wrong-architecture failure. It now fails the check, unless the image exists locally (a local build that was never pushed). - The extra docker run arguments were an array, which bash before 4.4 (macOS) treats as unset under set -u when empty, breaking hand runs there. A small drun wrapper replaces it. - The QEMU arm64 cli step gets a 10-minute timeout, so a hung emulated run fails quickly instead of at the 6-hour job limit. Refs ALI-1113
|
Review round 1 (fresh-context reviewer,
Confirmed: the arm64 steps run exactly when the build ran; a failed arm64 test leaves no digest, so the merge job fails and no tag moves (dependent jobs are held back too); the build runners can pull their own digest; the workflow has no Re-run locally after the fix (amd64): cli with and without a platform, a local-only image, a missing image (fails with the pull error), and |
A digest always names a registry image, and in CI the local copy under that name is the other architecture's (the amd64 check pulled it), so a failed arm64 pull fell back to it and reported a wrong architecture instead of the pull error. Refs ALI-1113
|
Review round 2 (fresh-context reviewer;
Stopping the loop here: the last commit is a two-line guard, tested locally. |
Fixes ALI-1113.
smoke-test.shbooted only the amd64 image of each variant, so an arm64-only break (a missing arm64 package, a bad binary) could still reach-latest. This boots the arm64 images too, before any tag moves.Changes
.github/scripts/smoke-test.shtakes an optional fourth argument,linux/amd64orlinux/arm64. With it, everydocker rungets--platform, the image for that platform is pulled first (a failed pull fails the check, unless the reference is a tag that exists locally), anduname -min the container must match (x86_64/aarch64). Without it the script behaves as before.ubuntu-24.04-armrunners. Each now boots its image there right after the build-by-digest step, before the digest is uploaded. A failure means no arm64 digest, so the merge job fails at its download step and the floating tags stay where they were. No QEMU is involved.build-basebuilds both platforms under QEMU on amd64. After the amd64 check, it now runs the cli checks again withlinux/arm64under that same QEMU. These are a few shortdocker runs (php -r,php -m,id,uname) with no server and no timeouts, much lighter than the emulated extension compile the build has already run, so the risk of a spurious failure blocking the weekly tags is small. The step has a 10-minute timeout.build-basenow passlinux/amd64, so they check the architecture too.CI cost
About one extra smoke-test run per arm64 leg, on runners that are already up: roughly 30–60 s for a frankenphp image (one boot plus the three
WORDPRESS_VCS_CHECKOUTboots), a few seconds for a cli image under QEMU. The arm64 frankenphp legs run in parallel with the amd64 ones, so the wall-clock cost is about the same.Testing
linux/amd64(8.4-frankenphp,8.4-frankenphp-dev,8.4-cli) and without a platform: all pass. An unknown platform exits 2 with a usage message.mainthat rebuilds an image, or a manual run of the workflow, exercises them.actionlintreports nothing new compared withmain.This workflow runs only on pushes to
main, the weekly schedule and manual dispatch, so this PR builds and publishes nothing.If the QEMU check turns out flaky
Remove the
Smoke test … (arm64, QEMU)step inbuild-base. The frankenphp checks don't depend on it.