Skip to content

ci(api): Dispatch the toolkit @sentry/api bump on each api@ release - #131244

Merged
BYK merged 3 commits into
masterfrom
ci/api-dispatch-toolkit-bump
Nov 16, 2026
Merged

BYK merged 3 commits into
masterfrom
ci/api-dispatch-toolkit-bump

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

getsentry/toolkit#2291 added toolkit's bump-sentry-api.yml, which keeps one PR on the newest @sentry/api release so toolkit's CI checks the CLI and MCP packages against it (part of #131204). It runs on a daily schedule. This change also dispatches it from bump-sentry-docs.yml whenever an api@ release is published, next to the existing sentry-docs dispatch, so toolkit picks up each release as it ships.

  • The dispatches are one matrix job with an entry for sentry-docs and one for toolkit. Each entry names the repo, the workflow file, the ref, and the app that can dispatch there. The entries run in parallel without fail-fast, so one failing doesn't cancel the other, and adding a downstream repo is one more entry.
  • sentry-docs keeps its existing app. The toolkit entry uses the release bot app (SENTRY_RELEASE_BOT_*), which this repo's bump-sentry-in-getsentry.yml and toolkit's own workflows already use, scoped to getsentry/toolkit with actions: write.
  • Both dispatches wait for a wait-for-npm job. It polls npm until it serves the release's version, for up to about 10 minutes. Craft publishes to npm before the GitHub release, but the registry can lag, and a bump dispatched too early would still read the previous version.
  • ci: Keep one rolling PR on the newest @sentry/api release toolkit#2291 has merged, so bump-sentry-api.yml now exists on toolkit's main.
  • Toolkit's daily schedule stays as a fallback.
  • Open question: does the release bot's installation have actions: write on toolkit? If it doesn't, the toolkit dispatch fails and the daily schedule still picks the release up.

via @BYK.

--

View Session [Sentry]

getsentry/toolkit keeps one PR on the newest @sentry/api release so its CI
checks the CLI and MCP packages against it. Dispatching that workflow from
the release here runs it as the release ships, instead of waiting for its
daily schedule. The token comes from the release bot app, which this repo
and toolkit both already use.
The npm registry can take a few minutes to serve a version craft just
published, so a dispatched bump could still read the previous one. A
wait-for-npm job now polls npm for the release's version, and the
sentry-docs and toolkit dispatches run after it.
@sentry-junior
sentry-junior Bot requested a review from a team as a code owner November 16, 2026 14:04
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 16, 2026
Comment thread .github/workflows/bump-sentry-docs.yml Resolved
The sentry-docs and toolkit dispatches were two copies of the same job.
A matrix runs them in parallel, without fail-fast, and adding or removing
a downstream repo is now one entry.
@sentry-junior
sentry-junior Bot requested a review from BYK November 16, 2026 16:20
Comment thread .github/workflows/bump-sentry-docs.yml Resolved
@BYK
BYK merged commit c4bec6d into master Nov 16, 2026
73 checks passed
@BYK
BYK deleted the ci/api-dispatch-toolkit-bump branch November 16, 2026 16:33
BYK added a commit that referenced this pull request Nov 17, 2026
…#131317)

sentry-docs and getsentry/toolkit each carry their own `@sentry/api`
bump: sentry-docs has a shell script that merges a PR, and toolkit has a
Node script that keeps one rolling PR. This adds
`bump-sentry-api-consumer.yml`, a `workflow_call` workflow both can call
from a thin `bump-sentry-api.yml`, so the logic lives here next to the
package. It follows up on #131244.

- **The script** is `.github/workflows/scripts/bump-sentry-api.js`,
ported with its tests from toolkit's `scripts/bump-sentry-api.mjs`. It
runs in the caller's checkout.
- **`pin` input:**
- `dependency` pins an exact `package.json` version with `pnpm add
--save-exact --lockfile-only`, as sentry-docs does today.
- `catalog` updates the `pnpm-workspace.yaml` catalog and its
`minimumReleaseAgeExclude` entry, as toolkit does today.
- **`mode` input:**
- `merge` keeps sentry-docs' current behavior. It commits "Bump
@sentry/api to X" on `bot/bump-sentry-api-to-X`, opens the PR with
`--fill` (or reuses one a failed run left open), and merges it with
`--squash --admin`.
- `rolling-pr` keeps toolkit's current behavior. It keeps one
`bot/bump-sentry-api` PR, rebuilds it from the default branch and
force-pushes it with a lease. If someone else pushed a commit to it, it
leaves the PR alone with a warning (merge commits don't count). It never
merges.
- **Per-caller settings:**
- `app-client-id` and the `app-private-key` secret name the GitHub App
that pushes and opens the PR. A PR opened with `github.token` doesn't
start the caller's CI. In `merge` mode the app must also be allowed to
`--admin` merge.
- `commit-author-name` and `commit-author-email` set the commit author.
They default to `github-actions[bot]`, which toolkit uses today, and
sentry-docs passes its own bot.
- **Callers use it `@master`.** The workflow checks the script out from
`master` too, so the two always match.

**Merge order:**
1. This PR.
2. The consumer PRs, in either order: getsentry/sentry-docs#20835 and
getsentry/toolkit#2299. Each one calls this workflow from `master`.
3. #131318, which switches the release dispatch to each repo's
`bump-sentry-api.yml`.
4. A follow-up in sentry-docs that deletes its temporary
`bump-api-schema-sha.yml` alias.

<!-- junior-request-attribution:start -->
via @BYK.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3A69da19b385017e68b7f9eace56e9477f -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3A69da19b385017e68b7f9eace56e9477f)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A69da19b385017e68b7f9eace56e9477f/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: BYK <[email protected]>
BYK added a commit that referenced this pull request Nov 17, 2026
…131318)

Once every consumer has a thin `bump-sentry-api.yml` that calls
#131317's reusable workflow, the release dispatch no longer needs a
per-repo workflow file or ref. This reduces the dispatch matrix to
`repo: [sentry-docs, toolkit]`. Each entry dispatches
`bump-sentry-api.yml` on the repo's default branch, and the job still
waits for npm first. It follows up on #131244.

- **Rename:** `bump-sentry-docs.yml` becomes
`dispatch-api-consumers.yml`, since it no longer bumps only sentry-docs.
The `.craft.yml` comment that pointed at it is updated.
- **Tokens:** entries use the release bot (`SENTRY_RELEASE_BOT_*`)
unless they name another app. sentry-docs keeps
`SENTRY_API_SCHEMA_UPDATER_*` through a matrix `include`, because
nothing in sentry-docs uses the release bot. Whether its installation
reaches sentry-docs with `actions: write` is unverified. Moving
sentry-docs to the release bot later means deleting that `include`
entry.
- **Adding a consumer** means adding its repo name, once it has a
`bump-sentry-api.yml`.

**Merge order:** this PR goes last.
1. #131317, the reusable workflow.
2. The consumer PRs, in either order: getsentry/sentry-docs#20835 and
getsentry/toolkit#2299.
3. This PR.
4. A follow-up in sentry-docs that deletes its temporary
`bump-api-schema-sha.yml`.

No dispatch ever targets a missing workflow during the rollout. Toolkit
already has `bump-sentry-api.yml`. getsentry/sentry-docs#20835 adds
`bump-sentry-api.yml` and keeps `bump-api-schema-sha.yml` as a
dispatch-only alias, so both the old name (current `master`) and the new
name (this PR) exist until this merges.

<!-- junior-request-attribution:start -->
via @BYK.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3A69da19b385017e68b7f9eace56e9477f -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3A69da19b385017e68b7f9eace56e9477f)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A69da19b385017e68b7f9eace56e9477f/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: BYK <[email protected]>
BYK added a commit to getsentry/sentry-docs that referenced this pull request Nov 17, 2026
#20835)

## DESCRIBE YOUR PR

The `@sentry/api` bump moves into getsentry/sentry#131317's reusable
`bump-sentry-api-consumer.yml`, so every consumer of the package runs
the same logic from one place.

- `bump-api-schema-sha.yml` becomes `bump-sentry-api.yml`, the name
every consumer uses. It calls the reusable workflow in `merge` mode with
a `dependency` pin, and `scripts/bump-sentry-api.sh` is deleted.
- The bump behaves as before:
  - same hourly schedule, dispatch and concurrency group;
  - the same `SENTRY_API_SCHEMA_UPDATER` app and commit author;
- a "Bump @sentry/api to X" commit on `bot/bump-sentry-api-to-X`, with a
PR opened with `--fill` and merged with `--squash --admin`.
- One change: the dispatch-time npm retry is gone. getsentry/sentry now
waits until npm serves a release before it dispatches
(getsentry/sentry#131244).
- `bump-api-schema-sha.yml` stays for now as a dispatch-only alias that
runs the same bump. getsentry/sentry dispatches that name until
getsentry/sentry#131318 merges, and a follow-up deletes it afterwards.
- The develop-docs build-process page, the `pnpm-workspace.yaml` comment
and an `update-docs-changelog.yml` comment now point at the new file.

**Merge order:**
1. getsentry/sentry#131317.
2. This PR. It calls that workflow from getsentry/sentry `master`.
3. getsentry/sentry#131318.
4. The follow-up that deletes the alias.

## IS YOUR CHANGE URGENT?

- [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD
- [ ] Other deadline: YYYY-MM-DD
- [x] No deadline: Not urgent, can wait up to 1 week+

<!-- junior-request-attribution:start -->
via @BYK.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3A69da19b385017e68b7f9eace56e9477f -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3A69da19b385017e68b7f9eace56e9477f)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A69da19b385017e68b7f9eace56e9477f/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: BYK <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant