Skip to content

feat(cli): ship zstd release downloads - #2923

Merged
BYK merged 1 commit into
mainfrom
feat/cli-zstd-downloads
Dec 5, 2026
Merged

BYK merged 1 commit into
mainfrom
feat/cli-zstd-downloads

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Release builds now write a .zst next to each .gz and attach both to the GitHub release. On the current sentry-linux-x64 that's 26.6 MB instead of 37.1 MB (~28% smaller).

curl's built-in decoding doesn't help here: GitHub release assets are served without Content-Encoding, so the installer has to decompress explicitly either way.

Changes

  • script/build.ts: compresses with zstd level 19 and a 2^27 window, in parallel with gzip. The window covers the whole binary, and both the zstd CLI and node:zlib decode it with no extra flags. It adds about a minute per build target.
  • install: reads <asset>.zst from the release registry. When it's listed and zstd is on PATH, the installer downloads it, checks it against the SHA-256, runs zstd -t, and unpacks with zstd -dcq. Anything else goes to the existing .gz path, then the raw binary. A checksum mismatch is still fatal. The GitHub fallback (registry down) stays on gzip.
  • cli upgrade: full downloads try .zst (through createZstdDecompress, when the runtime has it), then .gz, then the raw binary. Each fallback is logged at debug level, which also replaces a grandfathered silent catch.
  • CI: the .zst files upload as zst-<target> artifacts, and .craft.yml collects them. They stay out of sentry-* because the binpatch steps treat every non-.gz file there as a binary to diff. The app:sentry registry target has no target-level includeNames, so it lists the new files automatically.
  • Unchanged: nightlies (GHCR), Homebrew, the downloads.sentry-cdn.com GCS target, and install.ps1 stay on gzip.

Older releases have no .zst, so both paths fall through to .gz for them.

via @BYK.

--

View Session [Sentry]

Release builds now write a `.zst` next to each `.gz` (level 19, 128 MiB
window). On the current linux-x64 binary that is 26.6 MB instead of
37.1 MB. `install` prefers it when `zstd` is on PATH and the registry
lists it, and `cli upgrade` prefers it when node:zlib has zstd. Both
fall back to `.gz`, then the raw binary.

The zstd files upload as `zst-<target>` artifacts so the binpatch steps,
which treat every non-`.gz` file under `sentry-*` as a binary, skip them.
Nightlies, Homebrew, the CDN and install.ps1 stay on gzip.

Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
@vercel

vercel Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Building Building Preview Dec 4, 2026 8:47pm UTC
sentry-local Ready Ready Preview Dec 4, 2026 8:47pm UTC

Request Review

Comment thread .craft.yml Resolved
@sentry-junior
sentry-junior Bot marked this pull request as ready for review December 4, 2026 21:02
@sentry-junior
sentry-junior Bot requested a review from BYK December 4, 2026 21:02
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Dec 4, 2026
@BYK
BYK added this pull request to the merge queue Dec 5, 2026
Merged via the queue into main with commit 76d3b6f Dec 5, 2026
52 checks passed
@BYK
BYK deleted the feat/cli-zstd-downloads branch December 5, 2026 01:29

This branch was successfully deployed

2 active deployments
Preview – sentry-local — 7a046db2 Deployed Dec 4, 2026 by vercel[bot]
Preview – cli — 7a046db2 Deployed Dec 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant