Repository navigation
Boot-test every image before it gets a tag - #15
Conversation
Weekly no-cache rebuilds pushed -latest without ever starting the image. Now each image is pushed by digest, booted by .github/scripts/smoke-test.sh (PHP version, extensions, non-root, healthy, serving PHP over HTTP for the frankenphp images), and only then tagged. A failing image leaves the existing tags alone and holds back the images built FROM it. Only the amd64 image is booted. The dry_run input from the ticket is not included: child jobs build FROM the parent's -<sha> tag, which a dry run never creates. ALI-1101
…e comment Review of #15 found: the README said every image is booted, but arm64 images are not; a failing docker run in the CLI path exited under set -e without the SMOKE TEST FAILED line; and the wordpress-dev merge job's comment claimed it holds back images built FROM it, but nothing is built from wordpress-dev.
Review round 1 (fresh-context reviewer,
|
| Finding | Outcome |
|---|---|
P3: no dry_run input (ticket item 2) |
Redirected to ALI-1112, expanded after this review. The reviewer is right that my reasoning only rules out a full dry run: a base-only dry run (build, smoke, no tags, no children) is feasible and is now listed there as option 2. Still not in this PR: even a base-only run writes untagged digests to GHCR, so it needs a design decision rather than a quick add. |
| P3: CLI index is tagged after booting only amd64 | Declined for this PR, tracked in ALI-1113. Adding an arm64 step needs QEMU, which I cannot run locally, and a flaky emulated run would fail the weekly tag closed. Decision recorded there; native frankenphp arm64 legs are the better first step. |
| P3: README said every image is booted | Fixed in 0c7baec: now says the amd64 image of every variant, and that arm64 is built but not booted. |
| P3: stale "holds back images built FROM this one" comment in the wordpress-dev merge job | Fixed in 0c7baec. |
P3: a failing docker run in the CLI path exited under set -e without the SMOKE TEST FAILED line |
Fixed in 0c7baec; checked against a nonexistent image. |
Re-checked after the fixes: smoke test passes on 8.4-cli, shellcheck clean, actionlint unchanged at baseline.
Still unproven: the workflow can only run after merge. Trigger workflow_dispatch with force_build_all and confirm: multi-platform push-by-digest for the CLI images, pulling by digest on the runner, and the sparse checkout.
Closes ALI-1101 (https://linear.app/alias-project-inc/issue/ALI-1101), except the
dry_runinput (see below).Why
The Monday no-cache rebuild pushes
-latestwithout ever starting the image. A base that cannot start would replace the working one. (ALI-1092 was a related incident, though a smoke test of the base would not have caught that one.)What
.github/scripts/smoke-test.sh <variant> <image> <php-version>: boots the image and checks PHP version, extensions per variant, non-root, healthy, and for frankenphp a PHP page served over HTTP (SAPIfrankenphp), thedocker-configureoutput and Composer. Runnable by hand.imagetools createapplies any tag. Per-arch digests now download to/tmp/digests/{amd64,arm64}so the amd64 one can be identified.imagetools create.<tag>,-latestand-<sha>untouched, and the child images (dev, wordpress, wordpress-dev) are held back because their jobs need the parent to succeed.Tested locally
CMD(2.5s).actionlintandshellcheckreport nothing from these changes (the remaining findings are in the existing Build Summary step).Not verified
The workflow itself cannot run before merge. After merging, trigger
workflow_dispatchwithforce_build_alland check each merge job. Things only a real run proves: multi-platformpush-by-digestfor the cli images, pulling by digest on the runner, andsparse-checkoutof the script.Not included
dry_runinput: child jobs build FROM the parent's-<sha>tag, which a dry run never creates. Needs its own design.