Skip to content

feat(cli): Publish CLI releases under the v3 sentry-cli names - #2514

Draft
sentry-junior[bot] wants to merge 4 commits into
mainfrom
feat/cli-legacy-distribution-channels
Draft

sentry-junior[bot] wants to merge 4 commits into
mainfrom
feat/cli-legacy-distribution-channels

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Part of #1965. Each CLI release now also publishes to the channels that getsentry/sentry-cli (v3) used, so 4.0.0 replaces it there. npm sentry, app:sentry, and the sentry formula stay as they are.

Channel Target What 4.0.0 publishes
npm @sentry/cli npm[@sentry/cli] sentry-cli-4.0.0.tgz: the sentry tarball repacked under the old name, with a README that points to sentry. Same files and bin: {sentry}. No @sentry/cli-<platform> packages.
PyPI sentry-cli pypi Five sentry_cli-4.0.0-py3-none-<platform>.whl wheels (macOS arm64/x64, manylinux_2_28 aarch64/x86_64, win_amd64). Each holds one standalone binary as a data script, so pip installs a sentry command. No sdist.
getsentry/pypi sentry-pypi A PR there adding sentry_cli==4.0.0 from the same wheels.
downloads.sentry-cdn.com/sentry-cli/ gcs (bucket sentry-sdk-assets) The 10 binaries (raw and .gz) under /sentry-cli/4.0.0/ and /sentry-cli/latest/, with the v3 cache headers.
Release registry app:sentry-cli registry[app:sentry-cli] latest moves to 4.0.0, linking those CDN files with SHA-256 checksums.
Homebrew getsentry/tools/sentry-cli none getsentry/homebrew-tools#11 renames sentry-cli to sentry in the tap, so brew update moves v3 installs to the sentry formula and brew upgrade installs 4.0.0.

How the artifacts are built

  • build-binary (cli-build.yml) runs script/build-wheel.ts <target> after each binary build and uploads pypi-wheel-<target>. The linux-x64 job installs its wheel with pipx run and runs sentry --help. Versions are converted to PEP 440 (4.0.0-rc.1 → 4.0.0rc1, nightly -dev.N → .devN). An unsupported prerelease form fails the build.
  • build-npm runs script/pack-npm-alias.ts after the npm-package upload and uploads npm-package-sentry-cli.
  • requireNames makes Craft refuse to publish anything if the wheels or the @sentry/cli tarball are missing.
  • Platform tags come from the binaries: they need glibc 2.28 and macOS 13.5. pip matches only _0 macOS tags from 11 on, so the wheels use macosx_13_0. Linux wheels are not tagged musllinux.

No copies under the v3 file names

The CDN and registry get only the v4 names (sentry-linux-x64), not copies named like sentry-cli-Linux-x86_64. Consumers that look up a v3 name, such as pinned downloads.sentry-cdn.com/sentry-cli/<3.x>/sentry-cli-* URLs, /latest/sentry-cli-* (GCS never deletes, so these stay on 3.8.2), v3's sentry-cli update and update nagger, and sentry.io/get-cli, would otherwise silently swap a v3 binary for v4 under the sentry-cli name. v4's commands and exit codes differ, so that would break CI scripts without warning. It would also bring back the sentry-cli binary name that we decided not to ship. The cost is that v3's sentry-cli update stops with "Could not get the latest release version." once app:sentry-cli latest is 4.0.0; the migration guide documents it. sentry.io/get-cli no longer reads app:sentry-cli latest after getsentry/sentry#132672 (see below).

Upgrades from the v3 names

@sentry/cli@4 installs the same sentry command as sentry, so sentry cli upgrade must stay on the package it was installed from. It now reads the npm package from the script path (node_modules/@sentry/cli/...) and uses it for npm install -g @sentry/cli@<v>, the npm version lookups, and the uninstall hints. Before this, a @sentry/cli install ran npm install -g sentry@<v>, which npm refuses because the sentry bin is taken.

Release order

  • Before 4.0.0 is published: merge feat(cli): Install Sentry CLI v4 from sentry.io/get-cli sentry#132672. It makes sentry.io/get-cli hand off to cli.sentry.dev/install, keeps the legacy path for versions below 4, and routes the per-platform URLs to app:sentry v4 builds with a 3.8.2 fallback. Its registry lookups (apps/sentry/latest with package=sentry, and apps/sentry-cli/<version> only for 3.8.2 or a pinned version below 4) never read app:sentry-cli latest, so they hold after this PR publishes 4.0.0 there.
  • After 4.0.0 is in Formula/sentry.rb: merge sentry: renamed from sentry-cli homebrew-tools#11 (the sentry-cli → sentry rename). Merged earlier, it moves v3 users to the 0.x formula.
  • Before any further 3.x release: merge ci(release): Keep 3.x releases off the v4 npm, Homebrew, and Docker tags sentry-cli#3520, so 3.x can't take npm latest or Docker Hub latest back, or recreate the sentry-cli formula.
  • After 4.0.0 is published: deprecate the v4 range only, with the sentry-bot npm credentials (sentry-bot is the only @sentry/cli maintainer): npm deprecate "@sentry/cli@>=4.0.0" "Use the sentry package". 2.x and 3.x stay undeprecated, because bundler plugins and other tools still depend on them.

Notes for review

  • The registry target ignores includeNames under an app and links every artifact allowed by its target-level filter. That's why app:sentry-cli is its own target with a target-level includeNames that matches the gcs upload. The existing app:sentry entry's per-app includeNames has never applied; this PR leaves it alone.
  • The new build steps only run where Build runs: pushes to main and release/cli/**, and manual dispatch.
  • Docs: install options for pip, direct download, and the v3 names in getting-started, plus a channel-by-channel table in the v3 migration guide, which notes the sentry console-script clash with the self-hosted sentry PyPI package.
  • Docker is a separate change.

via @BYK.

--

View Session [Sentry]

Each CLI release also publishes to the channels that getsentry/sentry-cli
(v3) used, so 4.0.0 replaces it there:

- npm `@sentry/cli`: the `sentry` tarball repacked under the old name.
- PyPI `sentry-cli` and getsentry/pypi: one wheel per standalone binary,
  which installs the `sentry` command.
- downloads.sentry-cdn.com/sentry-cli/{version,latest}/ (gcs target).
- Release registry `app:sentry-cli`, linking the CDN files.
- Homebrew `getsentry/tools/sentry-cli`, which conflicts with `sentry`.

The v4 files keep their own names, so URLs and tools that look up v3
names (sentry-cli-Linux-x86_64, `sentry-cli update`) never get a v4 binary.

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

vercel Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
cli Ready Ready Preview Nov 26, 2026 11:54am UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 26, 2026 11:54am UTC

Request Review

Comment thread .github/workflows/cli-build.yml Resolved
Comment thread .craft.yml Resolved
`@sentry/cli@4` and the `sentry-cli` Homebrew formula install the same
`sentry` command as `sentry` and its formula. `cli upgrade` always
installed `sentry`, which npm refuses next to `@sentry/cli`, and it did
not see a `sentry-cli` formula install as Homebrew at all.

Read the npm package from the script path and the formula from the
Cellar path, then use them for upgrades, npm version lookups, and the
uninstall hints.

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

Drop the duplicated `sentry-cli` brew target. getsentry/homebrew-tools
renames `sentry-cli` to `sentry` with `formula_renames.json`, so
`brew update` moves v3 installs to the `sentry` formula. No v4 install
runs from a `sentry-cli` Cellar, so upgrade and uninstall go back to
naming only `getsentry/tools/sentry`.

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

# Conflicts:
#	packages/cli/src/lib/upgrade.ts

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – cli — 125b9400 Deployed Nov 26, 2026 by vercel[bot]
Preview – sentry-local — 125b9400 Deployed Nov 26, 2026 by vercel[bot]
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