Dashboard › cli › Distillation
6139cf15-0825-4a35-9c55-a8097be94216["lore_tm_v1_xyRl0vBe8ut0GJje8lI3tQO50PuSYgFJnBu4SI_8J0M","lore_tm_v1_3jjjoUZG0xgpVca9R2UOTWxKoo9bJu5woUb9GuxcPDk","lore_tm_v1_jnOG-RxSv2iXOsQUJ-kwMf_ZmtDH4al7CZ5tvR_bs3o","lore_tm_v1_X3aiCJQHq2Dth2PIae2LP0pku3fnRxbvk7ZwSPEanFo","lore_tm_v1_aXLs858XWunkjcpms_wBOgHD06VxBsG0aAZGJeLo-go"]
packages/cli/src/commands/cli/upgrade.ts: UpgradeSource is carried from resolveTargetWithFallback() through startChangelogFetch(), fetchChangelog(), executeStandardUpgrade(), and migrateToStandaloneForNightly(); the latter passes it to executeUpgrade("curl", target, downloadTag, undefined, setMessage, source), ensuring one selected source is retained for changelog and binary operations.startChangelogFetch() in packages/cli/src/commands/cli/upgrade.ts changed from five positional arguments to an options object containing channel, currentVersion, targetVersion, offline, and optional source; it returns undefined without fetching when offline or already at the target, and otherwise calls fetchChangelog() while swallowing failures.packages/cli/src/lib/delta-upgrade.ts: stableSource(source) uses getGitHubReleasesUrl(source), while nightlySource(source) uses source.ghcrRepo; getPrimaryUpgradeSource() throws "No primary upgrade source is configured" if PRIMARY_UPGRADE_SOURCE is absent.packages/cli/src/lib/delta-upgrade.ts now accepts an optional UpgradeSource defaulting to getPrimaryUpgradeSource() in fetchRecentReleases(), resolveStableChain(), resolveStableDelta(), resolveNightlyDelta(), attemptDeltaUpgrade(), prefetchNightlyPatches(), and prefetchStablePatches(); resolveNightlyChain() likewise accepts source?: UpgradeSource and constructs OciClient with repo: source.ghcrRepo.packages/cli/src/lib/release-notes.ts: stable changelogs fetch ${getGitHubReleasesUrl(source)}?per_page=30; buildChangelogSummaryForSource() rejects tags without source.tagPrefix, strips that prefix before version comparison, and preserves the public buildChangelogSummary() behavior for legacy unprefixed tags.packages/cli/src/lib/release-notes.ts now target https://api.github.com/repos/${source.githubRepo}/commits?sha=main&since=${sinceDate}&until=${untilDate}&per_page=100; fetchChangelog() accepts source?: UpgradeSource, defaults it to PRIMARY_UPGRADE_SOURCE, and passes it to both stable and nightly changelog paths.packages/cli/src/lib/upgrade.ts introduces ResolvedUpgradeVersion with readonly version and source, where the selected UpgradeSource must serve every later lookup and download in the operation.packages/cli/src/lib/upgrade.ts: fetchLatestFromGitHubWithSource(signal?, sources = UPGRADE_SOURCES) calls resolveUpgradeSource() with getGitHubLatestReleaseUrl, extracts non-draft/non-prerelease tags matching source.tagPrefix, removes the source prefix and leading v, and throws "No version found in GitHub release" when no valid version exists; compatibility wrapper fetchLatestFromGitHub(signal?, source?) returns only the version.packages/cli/src/lib/upgrade.ts: resolveNightlyManifest(tag, signal, sources) probes each sourceβs GitHub repository using getGitHubRepositoryUrl, then obtains a source-specific anonymous GHCR token and manifest; it falls through only on source-not-found HTTP 404 or a manifest error containing tag "${tag}": HTTP 404, and otherwise propagates the error.resolveNightlyManifest() exhausts ordered sources with UpgradeError("network_error", "No CLI upgrade source was found: every source returned HTTP 404"); isUpgradeSourceNotFound() identifies this condition by matching the error message.fetchLatestNightlyVersionWithSource() returns { version: getNightlyVersion(resolved.manifest), source: resolved.source }; compatibility wrapper fetchLatestNightlyVersion(signal?, source?) returns only the version, while resolveLatestUpgradeVersion(channel, signal?) returns the source-bearing result for stable or nightly.packages/cli/src/lib/upgrade.ts: resolveExistingUpgradeVersion(version) checks nightly versions through GHCR tag nightly-${version}, checks stable versions with getGitHubReleaseByTagUrl(version, source) through resolveUpgradeSource(), returns { version, source } on success, returns null only when every source returned HTTP 404, and propagates other errors.nightlyVersionExists(version, source) was made source-specific in packages/cli/src/lib/upgrade.ts, calling getAnonymousToken(source) and fetchManifest(token, \nightly-${version}`, undefined, source)`.trap -- 'printf exittrap >&2' EXIT, followed by doneexittrap.356212, child BASHPID was 356213, and the output ended doneexittrap-356212, showing the recorded EXIT trap executed for the parent PID.packages/cli/src/lib/upgrade.ts located downloadNightlyToPath() at line 728, its GHCR documentation near line 881, downloadBinaryToTemp() parameters and full-binary fallback around lines 896β943, downloadFullBinary() around lines 1007β1016, and another downloadTag path around lines 1116β1131; downloadFullBinary() routes nightly versions to downloadNightlyToPath(destPath, version, setMessage) and stable versions to downloadStableToPath(downloadTag ?? version, destPath, setMessage).getsentry/cli#1569, titled feat(cli): add toolkit upgrade bridge, with commit 4094ae9a7670f2bf46898fc7d5b8c7d89cf70819 authored by Burak Yigit Kaya (BYK, byk@sentry.io).#1569 summary: check Toolkit before legacy CLI repositories for stable, nightly, delta, prefetch, and changelog requests; fall back only on HTTP 404; retain one selected source through the complete upgrade operation; mirror the ordered-source contract in the shell installer; enforce parity in CI; closes issue #1244.#1569 validation commands: pnpm run lint, pnpm run typecheck, pnpm run check:deps, pnpm run check:errors, pnpm run check:patches, pnpm run check:stale-refs, pnpm run check:upgrade-sources, and shellcheck packages/cli/install.#1569 test results: focused bridge matrix had exactly 458 tests passed; isolated rerun of the 10 full-suite failure files had exactly 252 tests passed; the full coverage run had unrelated temporary-directory/SQLite contention and one load timeout.#1569 modifies 19 files: 1. .github/workflows/ci.yml (+1/-0), 2. package.json (+2/-1), 3. packages/cli/install (+159/-33), 4. packages/cli/package.json (+2/-1), 5. packages/cli/src/commands/cli/upgrade.ts (+80/-34), 6. packages/cli/src/lib/binary.ts (+140/-6), 7. packages/cli/src/lib/delta-upgrade.ts (+51/-30), 8. packages/cli/src/lib/ghcr.ts (+31/-17), 9. packages/cli/src/lib/release-notes.ts (+82/-37), 10. packages/cli/src/lib/upgrade.ts (+243/-70), 11. packages/cli/src/lib/version-check.ts (+13/-8), 12. packages/cli/test/commands/cli/upgrade.test.ts (+59/-12), 13. packages/cli/test/lib/binary.test.ts (+126/-2), 14. packages/cli/test/lib/delta-upgrade.test.ts (+170/-3), 15. packages/cli/test/lib/ghcr.test.ts (+26/-0), 16. packages/cli/test/lib/install-script.test.ts (+300/-33), 17. packages/cli/test/lib/release-notes.test.ts (+112/-1), 18. packages/cli/test/lib/upgrade.test.ts (+212/-37), and 19. packages/cli/test/lib/version-check.test.ts (+124/-1).cli at https://cli-git-feat-toolkit-bridge-upgrade.sentry.dev and sentry-local at https://sentry-local-git-feat-toolkit-bridge-upgrade.sentry.dev.4094ae9a7670f2bf46898fc7d5b8c7d89cf70819 and reported exactly 2 potential issues; Bugbot Autofix was off, and the displayed review did not include the issue details.