Skip to content

ci: Sentry releases with commits, finalize and deploy - #1419

Merged
GLinnik21 merged 2 commits into
mainfrom
sentry-releases
Nov 17, 2026
Merged

GLinnik21 merged 2 commits into
mainfrom
sentry-releases

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

Every shipped build now gets a Sentry release that knows its commits, and is finalized with a deploy once it is published. This turns on Sentry's suspect commits and suspect PRs, "resolve in next release", and regression detection, none of which worked because no release had commits.

What runs

  1. Build (build-package.yml, new step after the packaging assertions):
    • Derives the release name the binary reports: [email protected], -rc.N or -nightly-YYYYMMDD. It uses the same helpers as the source-bundle label, then checks that the exact string is in pkg/plxnative.
    • Runs sentry-cli releases new.
    • Runs releases set-commits with an explicit range: from the last final vX.Y.Z below this version (ci/rc.py::last_release) to the built commit. Sentry's default range would start at the previous release it knows. After a candidate that leaves the final with a single commit, and a patch of an older line would be measured from a newer line.
  2. Publish (release.yml, rc.yml, nightly.yml): a new composite action, .github/actions/sentry-deploy, runs releases finalize and deploys new -e <production|development> after the package is out.

Guards

  • Neither step can fail a build or a publish (continue-on-error). The debug-file upload stays fatal, as before.
  • Only a publishing run creates the release. A new input, sentry-release (default false), is set to:
    • !inputs.rebuild_tag by release.yml, so a re-publish does not rewrite an old release's commits or date;
    • "not dry" by rc.yml and nightly.yml. A dispatched dry run builds the same name as the real one: a nightly's name is its date, so it would replace the shipped nightly's commits.

Sentry settings done by hand (not in this diff)

  • Code mappings on plx-native and plx-native-dev, both on main:
    • /build/work/plx-native/plx-native/ → repo root (Rust frames);
    • /plxnative/ → repo root (C frames, -fdebug-prefix-map).
  • GitHub integration:
    • comments on suspect PRs: on;
    • GitHub issue state syncs to Sentry: on;
    • a closed GitHub issue resolves the Sentry issue "in next release".

Verified

  • python -m unittest ci.test_ci_workflows ci.test_ci_timeouts: 112 pass, including 6 new SentryReleases tests. Two mutations were tried and both fail the tests: dropping the binary-name check, and dropping rc's dry gate.
  • The range helpers were run against the real tags: last_release(..., below=0.11.0) returns v0.10.1, and v0.10.0^{} peels the annotated tag.
  • An independent review found three bugs in the first commit (dry runs, the rc-then-final range, rebuild_tag); the second commit fixes them.

Not verified

  • No run has exercised the steps yet. The nightly and rc dry runs on this PR skip them by design.
  • The first real nightly after merge is the live test: its run summary should say "created … with its commits" and "finalized and deployed".
  • A line or tag cut before this merges has no sentry-deploy action in its checkout. Its publish step fails silently (continue-on-error) and that release stays unfinalized.

No Rust, Makefile or Cargo changes, so no build-bench table is needed.

🤖 Generated with Claude Code

GLinnik21 and others added 2 commits November 17, 2026 01:49
…ploy

build-package.yml now creates the Sentry release a package reports
([email protected], -rc.N or -nightly-YYYYMMDD, checked against the
binary's own bytes) and attaches its commits through the plxnative
GitHub integration. The publish jobs of release.yml, rc.yml and
nightly.yml then finalize it and record a deploy to its environment
through the new .github/actions/sentry-deploy. Neither step can fail a
build or a publish.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…cit range

Review findings on the first commit:
- a dispatched dry run built the same release name as the real one and
  would replace a published nightly's commits, or plant a candidate that
  became the base of the next range: build-package.yml takes a new
  `sentry-release` input (default false) that only publishing runs set;
- a final built after its candidate got one commit, because Sentry's
  default range starts at the previous release it knows (the rc): the
  range is now the last final vX.Y.Z below the version (ci/rc.py's
  last_release) to the built commit;
- a rebuild_tag re-publish rewrote an old release's commits and date:
  release.yml passes `!inputs.rebuild_tag`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit 2730bef into main Nov 17, 2026
17 checks passed
@GLinnik21
GLinnik21 deleted the sentry-releases branch November 17, 2026 00:50
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