Skip to content

ci(release): load-test the linux-x64-musl addon on Alpine before upload #340

Description

@dean0x

Context

PR #338 added an ELF readelf gate to verify musl-linked native addons (NEEDED libc.so, no glibc SONAME). The gate proves ELF metadata but does NOT prove that Node.js can dlopen the addon on an actual musl system.

Proposal

After the readelf gate completes on the x86_64-unknown-linux-musl build leg only (aarch64 would require QEMU), run a load-test step in the stage-and-verify-napi job:

docker run --rm -v "$PWD:/w:ro" node:22-alpine node -e "require('/w/mds-napi.linux-x64-musl.node'); console.log('ok')"

This verifies that Node's require() can successfully load and link the addon on a musl C library.

Design Notes

Docker Hub pull rate limits: Anonymous pull rate limits on GitHub runners can flake a tag-push release build (the build would fail before any publish, but a re-run needs a new tag). Consider pulling from a mirror (public.ecr.aws/docker/library/node:22-alpine) or marking the step as non-blocking with a loud warning in the output.

Musl detection: Verify that the isMusl() check in crates/mds-napi/index.js (reads /usr/bin/ldd) returns true on node:22-alpine; otherwise the loader would pick the wrong platform package at runtime.

Acceptance Criteria

  • Load-test runs after readelf gate on x86_64-unknown-linux-musl only
  • Docker image pull is resilient to rate limits (mirror or non-blocking mark)
  • isMusl() detection validated on node:22-alpine
  • Test passes in a branch dry-run

Related

Relates to PR #338

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    github_actionsPull requests that update GitHub Actions codetech-debtTechnical debt

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions