Repository navigation
feat(cli): Publish CLI releases under the v3 sentry-cli names - #2514
Draft
sentry-junior[bot] wants to merge 4 commits into
Draft
sentry-junior[bot] wants to merge 4 commits into
sentry-junior[bot] wants to merge 4 commits into
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
BYK
reviewed
Nov 26, 2026
`@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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 thesentryformula stay as they are.@sentry/clinpm[@sentry/cli]sentry-cli-4.0.0.tgz: thesentrytarball repacked under the old name, with a README that points tosentry. Same files andbin: {sentry}. No@sentry/cli-<platform>packages.sentry-clipypisentry_cli-4.0.0-py3-none-<platform>.whlwheels (macOS arm64/x64, manylinux_2_28 aarch64/x86_64, win_amd64). Each holds one standalone binary as a data script, so pip installs asentrycommand. No sdist.sentry-pypisentry_cli==4.0.0from the same wheels.downloads.sentry-cdn.com/sentry-cli/gcs(bucketsentry-sdk-assets).gz) under/sentry-cli/4.0.0/and/sentry-cli/latest/, with the v3 cache headers.app:sentry-cliregistry[app:sentry-cli]latestmoves to 4.0.0, linking those CDN files with SHA-256 checksums.getsentry/tools/sentry-clisentry-clitosentryin the tap, sobrew updatemoves v3 installs to thesentryformula andbrew upgradeinstalls 4.0.0.How the artifacts are built
build-binary(cli-build.yml) runsscript/build-wheel.ts <target>after each binary build and uploadspypi-wheel-<target>. The linux-x64 job installs its wheel withpipx runand runssentry --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-npmrunsscript/pack-npm-alias.tsafter thenpm-packageupload and uploadsnpm-package-sentry-cli.requireNamesmakes Craft refuse to publish anything if the wheels or the@sentry/clitarball are missing._0macOS tags from 11 on, so the wheels usemacosx_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 likesentry-cli-Linux-x86_64. Consumers that look up a v3 name, such as pinneddownloads.sentry-cdn.com/sentry-cli/<3.x>/sentry-cli-*URLs,/latest/sentry-cli-*(GCS never deletes, so these stay on 3.8.2), v3'ssentry-cli updateand update nagger, andsentry.io/get-cli, would otherwise silently swap a v3 binary for v4 under thesentry-cliname. v4's commands and exit codes differ, so that would break CI scripts without warning. It would also bring back thesentry-clibinary name that we decided not to ship. The cost is that v3'ssentry-cli updatestops with "Could not get the latest release version." onceapp:sentry-clilatest is 4.0.0; the migration guide documents it.sentry.io/get-clino longer readsapp:sentry-clilatest after getsentry/sentry#132672 (see below).Upgrades from the v3 names
@sentry/cli@4installs the samesentrycommand assentry, sosentry cli upgrademust 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 fornpm install -g @sentry/cli@<v>, the npm version lookups, and the uninstall hints. Before this, a@sentry/cliinstall rannpm install -g sentry@<v>, which npm refuses because thesentrybin is taken.Release order
sentry.io/get-clihand off tocli.sentry.dev/install, keeps the legacy path for versions below 4, and routes the per-platform URLs toapp:sentryv4 builds with a 3.8.2 fallback. Its registry lookups (apps/sentry/latestwithpackage=sentry, andapps/sentry-cli/<version>only for 3.8.2 or a pinned version below 4) never readapp:sentry-clilatest, so they hold after this PR publishes 4.0.0 there.Formula/sentry.rb: merge sentry: renamed from sentry-cli homebrew-tools#11 (thesentry-cli→sentryrename). Merged earlier, it moves v3 users to the 0.x formula.latestor Docker Hublatestback, or recreate thesentry-cliformula.@sentry/climaintainer):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
includeNamesunder an app and links every artifact allowed by its target-level filter. That's whyapp:sentry-cliis its own target with a target-levelincludeNamesthat matches the gcs upload. The existingapp:sentryentry's per-appincludeNameshas never applied; this PR leaves it alone.Buildruns: pushes tomainandrelease/cli/**, and manual dispatch.sentryconsole-script clash with the self-hostedsentryPyPI package.via @BYK.
--
View Session [Sentry]