Skip to content

feat(ci): add delta patch generation for stable releases#618

Merged
BYK merged 6 commits intomainfrom
feat/stable-delta-patches
Apr 1, 2026
Merged

feat(ci): add delta patch generation for stable releases#618
BYK merged 6 commits intomainfrom
feat/stable-delta-patches

Conversation

@BYK
Copy link
Copy Markdown
Member

@BYK BYK commented Apr 1, 2026

Summary

  • Extracts delta patch generation from publish-nightly into a shared generate-patches job
  • Runs on both main (nightlies) and release/** (stable) branches, skips PRs
  • Old-binary source switches by branch: main → previous nightly from GHCR, release/** → previous stable release from GitHub Releases
  • Patches uploaded as sentry-patches workflow artifact — craft picks these up for stable releases via the existing /^sentry-.*$/ pattern
  • publish-nightly slimmed down: downloads pre-generated patches from the artifact and pushes to GHCR (no more inline bsdiff)
  • On failure, a GitHub issue is filed automatically (with deduplication)
  • continue-on-error: true ensures patch failures never block releases or nightlies

Motivation

The client-side delta upgrade code (src/lib/delta-upgrade.ts) expects .patch assets on GitHub Releases but no CI step was generating them for stable releases. Delta upgrades silently fell back to full binary download every time. This PR closes that gap while unifying the patch generation logic between both channels.

Extract patch generation from publish-nightly into a shared
generate-patches job that runs on both main and release/** branches.
Old-binary source switches by branch: main fetches previous nightly
from GHCR, release/** fetches previous stable release from GitHub
Releases. Patches are uploaded as sentry-patches workflow artifact
that craft picks up for stable releases. publish-nightly downloads
the artifact and pushes to GHCR as before. On failure, an issue is
filed automatically.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 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 ✨

  • (ci) Add delta patch generation for stable releases by BYK in #618

Bug Fixes 🐛

  • (build) Use esbuild for binary bundling to fix minifier collision bug by BYK in #619

Internal Changes 🔧

  • Regenerate skill files and command docs by github-actions[bot] in e01b2520

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Codecov Results 📊

129 passed | Total: 129 | 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 100.00%. Project has 1351 uncovered lines.
❌ Project coverage is 95.46%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    95.47%    95.46%    -0.01%
==========================================
  Files          204       204         —
  Lines        29738     29738         —
  Branches         0         0         —
==========================================
+ Hits         28389     28387        -2
- Misses        1349      1351        +2
- Partials         0         0         —

Generated by Codecov Action

@BYK BYK marked this pull request as ready for review April 1, 2026 09:56
Copy link
Copy Markdown
Contributor

@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.

Autofix Details

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Artifact pattern inadvertently downloads patch files into binaries
    • Changed artifact download pattern from 'sentry-*' to 'sentry-*64' to match only uncompressed binary artifacts, excluding sentry-patches and compressed artifacts.

Create PR

Or push these changes by commenting:

@cursor push fbd8ded3e3
Preview (fbd8ded3e3)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -484,7 +484,7 @@
       - name: Download uncompressed artifacts (for SHA-256 computation)
         uses: actions/download-artifact@v8
         with:
-          pattern: sentry-*
+          pattern: sentry-*64
           path: binaries
           merge-multiple: true

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Copy link
Copy Markdown
Contributor

@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 2 potential issues.

Fix All in Cursor

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

@BYK BYK merged commit c2d9cae into main Apr 1, 2026
26 checks passed
@BYK BYK deleted the feat/stable-delta-patches branch April 1, 2026 13:01
BYK added a commit that referenced this pull request Apr 2, 2026
## Summary

- Restores `GH_TOKEN: ${{ github.token }}` env for all `gh` CLI steps in
`generate-patches` job
- Also restores it for the `eval-skill` fork check step that was
inadvertently removed in #618

`gh` CLI supports both `GH_TOKEN` and `GITHUB_TOKEN` as env vars, but
GitHub Actions does not automatically expose `GITHUB_TOKEN` as a shell
environment variable — it's only available in `${{ }}` expressions. The
token must be explicitly mapped via `env:` for `gh` to find it.

This fixes the `generate-patches` failure on `release/0.24.0`:
https://github.com/getsentry/cli/actions/runs/23875917691/job/69619096534
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