Skip to content

ref(cli): Drop the getsentry/cli upgrade fallback - #2516

Merged
BYK merged 1 commit into
mainfrom
byk/cli-drop-legacy-upgrade-source
Nov 26, 2026
Merged

BYK merged 1 commit into
mainfrom
byk/cli-drop-legacy-upgrade-source

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

Cleans up two leftovers from the getsentry/cli → getsentry/toolkit move (part of #1965).

Drop the getsentry/cli upgrade source

UPGRADE_SOURCES listed Toolkit first and fell back to getsentry/cli (unprefixed tags, ghcr.io/getsentry/cli) on HTTP 404. 0.45.0, the last getsentry/cli release, already checks Toolkit first, so old installs upgrade fine on their own code. The fallback only served explicit downgrades to ≤0.45. Breaking for that case only: sentry cli upgrade 0.45.0 (or older) now reports the version as not found.

With one source left, the multi-source resolver goes away:

  • UPGRADE_SOURCES / PRIMARY_UPGRADE_SOURCE → a single UPGRADE_SOURCE.
  • resolveUpgradeSource (probe each source, fall through on 404) → fetchUpgradeRelease(url, signal), which turns HTTP 404 into UpgradeReleaseNotFoundError and every other failure into an UpgradeError.
  • Nightly lookups no longer probe api.github.com/repos/<repo> before going to GHCR. That probe only existed to pick a source, and it cost one GitHub API call per nightly check.
  • Removed the paths only the legacy source used: /releases/latest, single-object release responses, and v-prefix stripping of release tags.
  • standaloneVersionExists / nightlyVersionExists collapse into resolveExistingUpgradeVersion(version, source).
  • ghcr.ts comments now say ghcr.io/getsentry/toolkit.
  • Removed the legacy-fallback and getsentry/cli source-affinity tests.

Open question: the UpgradeSource parameter that delta-upgrade, ghcr, and release-notes pass around stays for now, defaulting to UPGRADE_SOURCE. Collapsing it into constants would touch most of the upgrade code, so it's left for a follow-up if we want it.

Fix the changelog "…and more" link

The upgrade changelog's truncation line linked to https://github.com/getsentry/cli/releases, which is archived and stops at 0.45.0. It now links to Toolkit's CLI releases: https://github.com/getsentry/toolkit/releases?q=cli%40.

via @BYK.

--

View Session [Sentry]

Upgrades now resolve only against getsentry/toolkit `cli@` releases and
its GHCR nightlies. The getsentry/cli fallback only helped explicit
downgrades to 0.45 or older: 0.45.0 already checks Toolkit first, so
older installs upgrade on their own code.

Without a second source, the resolver no longer probes the GitHub repo
before nightly lookups, and the unprefixed-tag and `/releases/latest`
paths are gone. The changelog "…and more" link now points at Toolkit's
CLI releases instead of the archived getsentry/cli repo.

Refs #1965

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:16am UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 26, 2026 11:16am UTC

Request Review

@sentry-junior
sentry-junior Bot requested a review from BYK November 26, 2026 11:36
@BYK
BYK marked this pull request as ready for review November 26, 2026 11:49
@BYK
BYK merged commit fc99d4c into main Nov 26, 2026
28 of 29 checks passed
@BYK
BYK deleted the byk/cli-drop-legacy-upgrade-source branch November 26, 2026 11:49

This branch was successfully deployed

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