Repository navigation
ci: Keep one rolling PR on the newest @sentry/api release - #2291
Conversation
getsentry/sentry releases @sentry/api from static/packages/api. A daily workflow pins the catalog to the newest npm release and opens a PR, so test.yml checks the CLI, MCP and shared packages against each release. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
run() trimmed execFileSync's result, which is null for the pnpm install that inherits stdout, so every bump crashed before committing. Check for an open bump PR first and leave it alone, so a daily run does not force-push over adapter fixes pushed to it.
BYK
left a comment
There was a problem hiding this comment.
A PR per upgrade is too noisy and we should be using workspace: definition for in-repo updates anyway.
A PR per release is noisy. The bump now keeps a single PR on the bot/bump-sentry-api branch: it opens one when none is open, and when a newer release ships it rebuilds the branch from main, force-pushes with a lease and retitles the PR. A commit on the branch from anyone but the bot makes it skip with a warning instead of overwriting the commit. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
BYK
left a comment
There was a problem hiding this comment.
Can we not use the token from the release.yml workflow's app?
|
84d4d7a switches to one rolling PR on |
|
@BYK It already does: |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit 84d4d7a. Configure here.
Merging main into the bump branch, such as with GitHub's Update branch, made the bump stop following new releases. The rebuild from main loses nothing such a merge added, so only non-merge commits now count.
BYK
left a comment
There was a problem hiding this comment.
@BYK It already does: bump-sentry-api.yml mints its token with the same vars.SENTRY_RELEASE_BOT_CLIENT_ID / secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY app as release.yml, through the same pinned create-github-app-token step. The only unknown is whether that app's installation has pull-request write access, which the first run will show.
Then why can we not use cross-repo triggers both on sentry-docs and here from getsentry/sentry on every release of @sentry/api package?
|
@BYK We can, and the PR body was wrong to say it needs another app. getsentry/sentry already has the release bot's |
|
The job triggers on releases from getsentry/sentry side should wait till the package is available on npm before triggering downstream jobs. |
|
Done in getsentry/sentry#131244 (a321c2d4). A new |
…131244) 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. - getsentry/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. <!-- 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>

@sentry/apinow releases from getsentry/sentrystatic/packages/apiasapi@x.y.z. Nothing in this repo picks up new releases: there is no Renovate or Dependabot config, and the catalog still pins 2.0.0.The new
bump-sentry-api.ymlworkflow runs daily or on dispatch. It keeps one PR, on the fixedbot/bump-sentry-apibranch, that pins the catalog to the newest npm release. That makes this repo the first outside consumer of each release. Part of getsentry/sentry#131204.--force-with-lease, and retitles the PR. It never opens a second PR, and does nothing when the PR already pins the latest release.minimumReleaseAgeExcludeentry so a fresh release installs, and the lockfile. Nothing merges automatically.release.ymlalready uses, because PRs opened withgithub.tokendon't start other workflows. Open question: does that app's installation allow opening PRs here?bump-sentry-docs.ymlon eachapi@release and merges after this PR. The daily schedule stays as a fallback.via @BYK.
--
View Session [Sentry]