Repository navigation
ci: Docker release crashes or times out under arm64 emulation - #3516
Conversation
|
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. Tip
Note Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect. Caution Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code. |
Pull Request
Issue
The Docker release job builds the
linux/arm64/v8image on an x64 runner, so Node.js runs under QEMU emulation for the whole build stage of the arm64 image, includingnpm ciand the webpack build. This fails in two ways:qemu: uncaught target signal 4 (Illegal instruction)on runners with an AVX-512 CPU, the same crash as inDocker Build: address QEMU arm64 SIGILL crashes parse-server#10705. Here the build step then hangs until the timeout.Since July 2026, 11 of 17 Docker release jobs timed out and 1 failed in
npm ci; none of them published an image. 35 releases since September 2025 have no image on Docker Hub, among them8.5.0and 10 of the 149.3.0-alphareleases.Approach
This ports parse-community/parse-server#10706. The image is cross-built, so that no code runs under emulation and QEMU is not needed anymore.
FROM --platform=$BUILDPLATFORM). It installs the production dependencies for the architecture of the image withnpm ci --os=linux --cpu=<arch> --libc=musl. No production dependency is platform-specific yet, so this guards against future native dependencies. The webpack output does not depend on the platform.npm run prepare && npm run buildanymore.npm cialready runs thepreparescript, which builds the bundles inParse-Dashboard/public/bundles, the only bundles copied to the image;npm run buildwrites toproduction/andPIG/, which are not copied. This saves 3 of 4 webpack builds per platform, which matters more now that both platforms build at the same time.RUNinstruction; a comment now says it must not have one.BUILDPLATFORMandTARGETARCH, like the legacy Docker builder, run the build stage on their own platform and install the dependencies for it, as before.release-manual-docker.ymlbuilds a ref with a previous Dockerfile, BuildKit falls back to its own bundled QEMU, so that build is as slow and crash-prone as before.linux/arm64/v8image, which no longer needs emulation, so that the arm64 build is checked before a release. Each platform has its own build cache scope. The checkDocker linux/amd64keeps its name, so the required checks need no change.Raising the timeout was considered, but the arm64 build already takes most of the 60 minutes, and after a crash the step hangs until any timeout. Native arm64 runners were not chosen for the same reasons as in Parse Server: one job per platform and a job that merges the images in each release workflow.
Verified locally on an arm64 host with Docker 29.9.1, comparing images built with the previous and the new Dockerfile:
linux/amd64andlinux/arm64, the/srcfolder of both images is identical in content, file mode and owner, and so is the image configuration.nodewith the architecture of the image.DOCKER_BUILDKIT=0) and kaniko 1.23.2 build an image with the same/srcfolder as BuildKit. Alinux/arm/v7image builds and runs.Tasks
Summary by CodeRabbit