Skip to content

fix(upgrade): check GHCR for nightly version existence instead of GitHub Releases#352

Merged
BYK merged 1 commit intomainfrom
byk/fix-nightly-version-exists
Mar 5, 2026
Merged

fix(upgrade): check GHCR for nightly version existence instead of GitHub Releases#352
BYK merged 1 commit intomainfrom
byk/fix-nightly-version-exists

Conversation

@BYK
Copy link
Member

@BYK BYK commented Mar 5, 2026

Fixes CLI-B5

When a user pins a specific nightly version (e.g. sentry cli upgrade 0.14.0-dev.1772661724), the versionExists() function was checking GitHub Releases — which only has stable releases. Nightly builds are published to GHCR with versioned tags like nightly-0.14.0-dev.1772661724, so the check always returned 404 and threw a false UpgradeError: Version X not found.

Changes

  • Added nightlyVersionExists() helper that checks GHCR for the versioned nightly tag via anonymous token exchange + manifest fetch (2 HTTP requests)
  • Updated versionExists() to route nightly versions (detected via isNightlyVersion()) to GHCR instead of GitHub Releases/npm
  • Network errors from GHCR now propagate as UpgradeError — only 404/403 returns false (consistent with stable version checks)
  • Fixed pre-existing bug: downloadNightlyToPath() now accepts an optional version parameter to fetch the pinned versioned tag instead of always using the rolling :nightly tag

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Trace

Other

  • (api) Add --data/-d flag and auto-detect JSON body in fields by BYK in #320
  • (formatters) Render all terminal output as markdown by BYK in #297
  • (install) Add Sentry error telemetry to install script by BYK in #334
  • (issue-list) Global limit with fair distribution, compound cursor, and richer progress by BYK in #306
  • (log-list) Add --trace flag to filter logs by trace ID by BYK in #329
  • (logger) Add consola-based structured logging with Sentry integration by BYK in #338
  • (project) Add project create command by betegon in #237
  • (upgrade) Add binary delta patching via TRDIFF10/bsdiff by BYK in #327
  • Improve markdown rendering styles by BYK in #342

Bug Fixes 🐛

Api

  • Use numeric project ID to avoid "not actively selected" error by betegon in #312
  • Use limit param for issues endpoint page size by BYK in #309
  • Auto-correct ':' to '=' in --field values with a warning by BYK in #302

Formatters

  • Expand streaming table to fill terminal width by betegon in #314
  • Fix HTML entities and escaped underscores in table output by betegon in #313

Setup

  • Suppress agent skills and welcome messages on upgrade by BYK in #328
  • Suppress shell completion messages on upgrade by BYK in #326

Upgrade

  • Check GHCR for nightly version existence instead of GitHub Releases by BYK in #352
  • Replace Bun.mmap with arrayBuffer on all platforms by BYK in #343
  • Replace Bun.mmap with arrayBuffer on macOS to prevent SIGKILL by BYK in #340
  • Use MAP_PRIVATE mmap to prevent macOS SIGKILL during delta upgrade by BYK in #339

Other

  • (ci) Generate JUnit XML to silence codecov-action warnings by BYK in #300
  • (install) Fix nightly digest extraction on macOS by BYK in #331
  • (nightly) Push to GHCR from artifacts dir so layer titles are bare filenames by BYK in #301
  • (project create) Auto-correct dot-separated platform to hyphens by BYK in #336
  • (region) Resolve DSN org prefix at resolution layer by BYK in #316
  • (test) Handle 0/-0 in getComparator anti-symmetry property test by BYK in #308
  • (trace-logs) Timestamp_precise is a number, not a string by BYK in #323

Documentation 📚

  • Document SENTRY_URL and self-hosted setup by BYK in #337

Internal Changes 🔧

Api

  • Upgrade @sentry/api to 0.21.0, remove raw HTTP pagination workarounds by BYK in #321
  • Wire listIssuesPaginated through @sentry/api SDK for type safety by BYK in #310

Other

  • (craft) Add sentry-release-registry target by BYK in #325
  • (project create) Migrate human output to markdown rendering system by BYK in #341
  • (upgrade) Use copy-then-mmap for zero JS heap during delta patching by BYK in #344

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Codecov Results 📊

101 passed | Total: 101 | Pass Rate: 100% | Execution Time: 0ms

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 88.89%. Project has 3683 uncovered lines.
✅ Project coverage is 80.67%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
upgrade.ts 81.80% ⚠️ 81 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    80.66%    80.67%    +0.01%
==========================================
  Files          127       127         —
  Lines        19028     19052       +24
  Branches         0         0         —
==========================================
+ Hits         15348     15369       +21
- Misses        3680      3683        +3
- Partials         0         0         —

Generated by Codecov Action

@BYK BYK marked this pull request as ready for review March 5, 2026 12:49
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@BYK BYK force-pushed the byk/fix-nightly-version-exists branch from ae992b9 to a33cb6c Compare March 5, 2026 12:51
…Hub Releases

Fixes CLI-B5

When a user pins a specific nightly version (e.g. `sentry cli upgrade
0.14.0-dev.1772661724`), the `versionExists()` function was checking
GitHub Releases (which only has stable releases). Nightly builds are
published to GHCR with tags like `nightly-0.14.0-dev.1772661724`.

Changes:
- Route nightly version checks to GHCR via `fetchManifest()` instead of
  GitHub Releases, so pinned nightly upgrades no longer fail with a false
  "Version X not found" error
- Propagate network errors from GHCR (only 404/403 returns false)
- Pass pinned version to `downloadNightlyToPath()` so the correct
  versioned tag is fetched instead of the rolling :nightly tag
@BYK BYK force-pushed the byk/fix-nightly-version-exists branch from a33cb6c to ad01e1e Compare March 5, 2026 13:00
@BYK BYK merged commit f094a10 into main Mar 5, 2026
21 checks passed
@BYK BYK deleted the byk/fix-nightly-version-exists branch March 5, 2026 13:05
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