Skip to content

v3.0.0-rc.5 published without linux-x64 binaries — npm install falls back to PHAR and fails without PHP #185

Description

@jasdeepkhalsa

Summary

The v3.0.0-rc.5 release run failed three of its binary build jobs, but the Publish npm packages job still ran and succeeded. The result is a published @dbdiff/cli@3.0.0-rc.5 that is missing three platform packages — including linux-x64, the most common CI, Docker and server target.

Which packages are missing

platform package rc.4 rc.5
@dbdiff/cli-darwin-arm64 200 200
@dbdiff/cli-darwin-x64 200 200
@dbdiff/cli-linux-arm64 200 200
@dbdiff/cli-linux-arm64-musl 200 404
@dbdiff/cli-linux-x64 200 404
@dbdiff/cli-linux-x64-musl 200 404
@dbdiff/cli-win32-arm64 200 200
@dbdiff/cli-win32-x64 200 200

(HTTP status from https://registry.npmjs.org/@dbdiff%2Fcli-<platform>/<version>.)

Impact

bin/dbdiff.js falls back to the bundled PHAR when no native binary resolves, which needs system PHP. On a Linux x64 box with PHP installed it appears to work:

$ node node_modules/@dbdiff/cli/bin/dbdiff.js --version
DBDiff 3.0.0-rc.5

Take PHP off PATH — a plain node:* Docker image, or most CI runners — and it is a hard failure:

@dbdiff/cli: No native binary is available for linux-x64.
Attempted PHAR fallback but 'php' was not found in PATH.
Install PHP 8.1+ from https://www.php.net/downloads and add it to your PATH,
or open an issue at https://github.com/DBDiff/DBDiff/issues

This regresses the "no PHP required" guarantee the npm wrapper is built around, on the platform where it matters most. rc.4 is unaffected.

There is a second-order effect: npm install on a Linux x64 machine silently drops the three missing packages from package-lock.json, so a lockfile regenerated against rc.5 no longer pins all eight platforms even after the packages are republished.

Which jobs failed

All three failed at the same step, Build static PHP binary (Unix), and failed fast (~2m20s, against 6–18 minutes for the successful builds):

Notably Binary — linux-arm64 succeeded on the same ubuntu-24.04-arm runner as the musl job that failed, so this is not runner-wide — it looks specific to those static-php-cli targets.

Suggested fixes

  1. Republish the missing binaries for rc.5, or cut rc.6 once the builds are green. Until then ^3.0.0-rc.5 should be treated as unusable on Linux x64.
  2. Gate the npm publish job on the binary builds. The release currently publishes whatever binaries happen to exist, so a partial build silently produces a partial release. Failing the publish (or at minimum failing the run loudly before publish) would have caught this. A publish-time assertion that all eight platform packages have a binary would be a cheap guard.
  3. Consider making bin/dbdiff.js warn at install time rather than only at first invocation, so a missing platform binary surfaces during npm install instead of mid-diff.

Context

Found while upgrading akalforge/supaforge from rc.4 to rc.5; the bump is on hold until Linux x64 is publishable.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions