Skip to content

ci: Docker release crashes or times out under arm64 emulation - #3516

Merged
mtrezza merged 2 commits into
parse-community:alphafrom
mtrezza:ci/docker-arm64-emulation
Oct 28, 2026
Merged

mtrezza merged 2 commits into
parse-community:alphafrom
mtrezza:ci/docker-arm64-emulation

Conversation

@mtrezza

@mtrezza mtrezza commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Pull Request

Issue

The Docker release job builds the linux/arm64/v8 image on an x64 runner, so Node.js runs under QEMU emulation for the whole build stage of the arm64 image, including npm ci and the webpack build. This fails in two ways:

  • The arm64 build takes about 45 minutes under emulation, compared with about 6 minutes for the native amd64 build, so the job hits its 60-minute timeout. The median job duration rose from 44 minutes in September 2025 to the timeout since July 2026.
  • Node.js crashes under emulation with qemu: uncaught target signal 4 (Illegal instruction) on runners with an AVX-512 CPU, the same crash as in Docker 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 them 8.5.0 and 10 of the 14 9.3.0-alpha releases.

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.

  • The build stage runs on the platform of the build machine (FROM --platform=$BUILDPLATFORM). It installs the production dependencies for the architecture of the image with npm 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.
  • The build stage does not run npm run prepare && npm run build anymore. npm ci already runs the prepare script, which builds the bundles in Parse-Dashboard/public/bundles, the only bundles copied to the image; npm run build writes to production/ and PIG/, 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.
  • The release stage already has no RUN instruction; a comment now says it must not have one.
  • Builders that don't set BUILDPLATFORM and TARGETARCH, like the legacy Docker builder, run the build stage on their own platform and install the dependencies for it, as before.
  • The workflows do not set up QEMU anymore. If release-manual-docker.yml builds 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.
  • CI now also builds the linux/arm64/v8 image, which no longer needs emulation, so that the arm64 build is checked before a release. Each platform has its own build cache scope. The check Docker linux/amd64 keeps 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:

  • A multi-platform build as in the release workflow runs no command for the emulated platform with the new Dockerfile, compared with 5 commands with the previous Dockerfile.
  • For linux/amd64 and linux/arm64, the /src folder of both images is identical in content, file mode and owner, and so is the image configuration.
  • Both new images start, serve the login page and bundles, reject a wrong password, log in and return the dashboard configuration. The server runs as user node with the architecture of the image.
  • The legacy Docker builder (Docker 24, DOCKER_BUILDKIT=0) and kaniko 1.23.2 build an image with the same /src folder as BuildKit. A linux/arm/v7 image builds and runs.
  • The two platforms now build at the same time. Limited to 4 CPUs like a GitHub-hosted runner, the multi-platform build used at most 4.5 GiB of memory and ran webpack 2 times, compared with 8 times with the previous Dockerfile.

Tasks

  • Add tests
  • Add changes to documentation (guides, repository pages, in-code descriptions)

Summary by CodeRabbit

  • Build & Deployment
    • Docker image builds are now validated for both x86-64 and ARM64 platforms.
    • Cross-platform builds use architecture-appropriate production dependencies, helping ensure images are prepared for their target platform.
    • Automated and manual release builds continue to target both supported platforms.

@parse-github-assistant

Copy link
Copy Markdown

🚀 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

  • Keep pull requests small. Large PRs will be rejected. Break complex features into smaller, incremental PRs.
  • Use Test Driven Development. Write failing tests before implementing functionality. Ensure tests pass.
  • Group code into logical blocks. Add a short comment before each block to explain its purpose.
  • We offer conceptual guidance. Coding is up to you. PRs must be merge-ready for human review.
  • Our review focuses on concept, not quality. PRs with code issues will be rejected. Use an AI agent.
  • Human review time is precious. Avoid review ping-pong. Inspect and test your AI-generated code.

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.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: d65d5f27-05ac-48c4-b3da-3ccbabccfb81
Commits

Reviewing files that changed from the base of the PR and between 9ead37d and 278adf1.

Files selected for processing: 4
  • .github/workflows/ci.yml
  • .github/workflows/release-automated.yml
  • .github/workflows/release-manual-docker.yml
  • Dockerfile
Files with no reviewable changes: 2
  • .github/workflows/release-automated.yml
  • .github/workflows/release-manual-docker.yml

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

The Dockerfile now installs production dependencies for the target architecture while running the build stage on the build machine’s platform. CI and release workflows remove QEMU setup; CI also builds both configured platforms with separate cache scopes.

Changes: Docker platform builds

Layer / File(s) Summary
Build-stage architecture and dependencies
Dockerfile
The build stage uses the build machine’s platform. Production dependency installation selects an npm CPU value from the target architecture or machine architecture, and rejects unsupported values. The explicit prepare and build command is removed.
CI and release platform configuration
.github/workflows/ci.yml, .github/workflows/release-automated.yml, .github/workflows/release-manual-docker.yml
CI builds linux/amd64 and linux/arm64/v8 on ubuntu-latest with separate cache scopes. The CI and release workflows remove QEMU setup while retaining both build platforms.

Priority: Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: Minimal · up to 278ad

Cross-platform builds use the build machine’s architecture. No merge-blocking issue was identified.

Pre-merge checks: Passed 7
Check name Status Explanation
Title check Passed The title begins with the accepted prefix "ci:" but the first letter after the prefix is lowercase ("Docker" is capitalized, but the title's first word after the prefix is "Docker" which is capitalize…
Description check Passed The description follows the repository template. It includes the required Pull Request boilerplate, a detailed Issue section, and an Approach section that explains the cross-build change, the removal …
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Security Check Passed No security vulnerability pattern is introduced by the reviewed diff. The Dockerfile validates and maps TARGETARCH before using it, quotes the derived npm CPU value, and adds no untrusted command exec…
Engage In Review Feedback Passed No review feedback required engagement. The supplied review context reports no returned CodeRabbit review threads and zero actionable findings in the current review.
Full details: Title check

Explanation

The title begins with the accepted prefix "ci:" but the first letter after the prefix is lowercase ("Docker" is capitalized, but the title's first word after the prefix is "Docker" which is capitalized). The prefix and capitalization both match the requirement. The title refers to the Docker release and arm64 emulation problem, which is the main subject, though the change itself is a cross-build change that removes emulation rather than a fix to a crash, so the title is partially related to the main change.

Full details: Description check

Explanation

The description follows the repository template. It includes the required Pull Request boilerplate, a detailed Issue section, and an Approach section that explains the cross-build change, the removal of QEMU, the new CI arm64 build, and the local verification. The Tasks section has the "Add changes to documentation" item checked, and "Add tests" is left unchecked, which the author should justify or address.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

Full details: Security Check

Explanation

No security vulnerability pattern is introduced by the reviewed diff. The Dockerfile validates and maps TARGETARCH before using it, quotes the derived npm CPU value, and adds no untrusted command execution or secret handling. Workflow additions use fixed matrix values and separate cache scopes. The diff changes no dependencies and adds no new permissions, tokens, or external actions; it removes QEMU setup steps.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@mtrezza
mtrezza merged commit 562dc1a into parse-community:alpha Oct 28, 2026
12 checks passed
@mtrezza
mtrezza deleted the ci/docker-arm64-emulation branch October 28, 2026 20:31
@mtrezza mtrezza mentioned this pull request Oct 28, 2026
4 tasks done
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