ci(docker): build the web bundle natively; fail a hung multi-arch build fast - #100
Merged
Merged
Conversation
The v0.0.7 release run ended 'cancelled': its all-in-one job hung for 6h --
GitHub's default job timeout -- after 'npm ci' in the arm64 half of the
multi-arch build died under QEMU ('uncaught target signal 4 (Illegal
instruction)') and buildx never returned. timeplus/tpk:0.0.7 was never pushed.
The web bundle is plain JS/CSS, identical for every target, so the webbuild
stage now runs on the build host (--platform=$BUILDPLATFORM) and is copied
into both images; Node no longer runs under emulation at all. Both jobs get
timeout-minutes: 30 so a hang surfaces as a failure within the hour.
Verified: an amd64 cross-build from an arm64 host completes with webbuild
executing natively.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
What happened
The
v0.0.7Docker run ended cancelled — not by a person and not by the concurrency rule. Its all-in-one job hung for exactly 6 h (GitHub's default job timeout; the workflow set none) after this, 50 s in:Node crashed under arm64 QEMU emulation on the amd64 runner and buildx never returned. The
tpk-appjob had already finished, sotimeplus/tpk-app:0.0.7existed (and is what production runs) buttimeplus/tpk:0.0.7was never pushed. A re-run of the same commit (attempt 2) succeeded in 3 min — a one-off emulation crash, but the exposure is structural.Change
deploy/docker/Dockerfile:FROM --platform=$BUILDPLATFORM node:22-alpine AS webbuild. The web bundle is plain JS/CSS, identical for every target platform, so it is built once on the build host and copied into both images. Node no longer runs under emulation at all — which also removes a redundant secondnpm ci+npm run buildfrom every multi-arch build..github/workflows/docker-publish.yml:timeout-minutes: 30on both jobs (normal runs take 2–4 min). A hang now fails within the hour and shows as a failure, not a cancellation six hours later.Verified
docker buildx build --platform linux/amd64 --target app) completes; thewebbuildsteps run without a platform prefix, i.e. natively on the host, instead of[linux/amd64 webbuild]under emulation.0.0.7images now exist on Docker Hub (from the re-run), so nothing is blocked on this PR.main).🤖 Generated with Claude Code