Skip to content

TML-3513: An ORM release tells prisma-cli at once, so the CLI follows it within minutes - #30944

Merged
wmadden merged 2 commits into
mainfrom
tml-cli-follows-orm-releases
Nov 6, 2026
Merged

wmadden merged 2 commits into
mainfrom
tml-cli-follows-orm-releases

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

When the ORM publishes a release, the publish workflow now tells prisma-cli at once, as it was meant to:

- name: Notify prisma-cli
  if: ${{ steps.version.outputs.tag == 'latest' && (github.event_name != 'workflow_dispatch' || github.event.inputs.dry-run != 'true') }}
  timeout-minutes: 2
  env:
    GH_TOKEN: ${{ secrets.DEPLOY_GITHUB_TOKEN }}

Why

The step read PRISMA_CLI_DISPATCH_PAT, a secret this repository has never had, and skipped with exit 0. On the 8.0.0-rc.22 publish it printed "PRISMA_CLI_DISPATCH_PAT is not configured; skipping". prisma-cli only noticed rc.22 at its daily run the next morning, 17 hours later.

DEPLOY_GITHUB_TOKEN is set in this repository. It is the token prisma-cli's docs/oss/release-automation.md names for this notice, and prisma/composer already sends its notice with it.

What changes

  • The step uses DEPLOY_GITHUB_TOKEN through gh api, the same call Composer makes.
  • A missing token fails the job instead of skipping. The error says the packages are already published and only the notice failed. Re-running is safe: the publish script skips versions already on npm.
  • The step runs only for latest releases. Dev pushes would start a prisma-cli run that changes nothing, because prisma-cli follows release tags only.
  • The step has a two-minute limit, like the curl call it replaces.

With prisma/prisma-cli's change that makes a product release cut a CLI release, an ORM release reaches prisma@latest within minutes. Together they close the gap a user reported on Discord, where [email protected] pinned @prisma/orm-toolchain 8.0.0-rc.21 for four days after ORM rc.22 shipped.

Not verified

A real dispatch from this repository. The first latest release after this merges will show it.

Closes TML-3513.

Agent: uther-28

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Release notifications are now limited to actual latest-version publications, including recovery releases, instead of running for other publish attempts.
    • Notifications now include the package and published version. Missing authorization is reported as an error, and the notification step has a two-minute time limit. These changes make notification behavior more consistent across supported release workflows.

…n it is missing

The notify step read PRISMA_CLI_DISPATCH_PAT, a secret this repository never had, and skipped with exit 0. So prisma-cli heard about rc.22 only from its daily run the next morning. DEPLOY_GITHUB_TOKEN is the token prisma-cli docs/oss/release-automation.md names, and Composer already sends its notice with it.

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
…limit

Dev pushes and beta dispatches start a prisma-cli run that follows only release tags, so they changed nothing there. The error now says the packages are already published.

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric
wmadden-electric requested a review from a team as a code owner November 3, 2026 14:33
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

The publish workflow now dispatches product-published for real latest publishes, including recovery dispatches. It sends the @prisma/orm-toolchain package name and published version. The step reports an error if DEPLOY_GITHUB_TOKEN is missing and has a two-minute timeout.

Changes: Publish notification

Layer / File(s) Summary
Latest publish event dispatch
.github/workflows/publish.yml
The workflow dispatches product-published only for real latest publishes, including recovery dispatches. It uses DEPLOY_GITHUB_TOKEN with gh api, fails if the token is missing, and applies a two-minute timeout.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: tensordreams

Merge Risk: Minimal · up to f196f

No merge-blocking issue was identified. The first latest release will verify the dispatch.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names a ticket ID and states the main change: an ORM release now triggers a prisma-cli notification, so the CLI follows within minutes. The changeset matches this: the publish workflow's Not…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names a ticket ID and states the main change: an ORM release now triggers a prisma-cli notification, so the CLI follows within minutes. The changeset matches this: the publish workflow's Notify prisma-cli step runs only for real latest publishes, dispatches product-published via gh api with DEPLOY_GITHUB_TOKEN, fails when the token is missing, and has a two-minute timeout. The title is specific and relevant, though it is long (87 characters) and leads with a ticket ID.

Finishing Touches
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: prisma/orm
  • Branch: main
  • File: .coderabbit.yml
  • Commit: bb69b5c
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 647d2cdc-9380-465f-8af8-5fb30cfa4f37
Commits

Reviewing files that changed from the base of the PR and between bb69b5c and f196f63.

Files selected for processing: 1
  • .github/workflows/publish.yml

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@pkg-pr-new

pkg-pr-new Bot commented Nov 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

@prisma/orm-extension-arktype-json

npm i https://pkg.pr.new/@prisma/orm-extension-arktype-json@30944

@prisma/orm-extension-middleware-cache

npm i https://pkg.pr.new/@prisma/orm-extension-middleware-cache@30944

@prisma/orm-extension-paradedb

npm i https://pkg.pr.new/@prisma/orm-extension-paradedb@30944

@prisma/orm-extension-pgvector

npm i https://pkg.pr.new/@prisma/orm-extension-pgvector@30944

@prisma/orm-extension-postgis

npm i https://pkg.pr.new/@prisma/orm-extension-postgis@30944

@prisma/orm-extension-supabase

npm i https://pkg.pr.new/@prisma/orm-extension-supabase@30944

@prisma/orm-family-mongo

npm i https://pkg.pr.new/@prisma/orm-family-mongo@30944

@prisma/orm-family-sql

npm i https://pkg.pr.new/@prisma/orm-family-sql@30944

@prisma/orm-framework

npm i https://pkg.pr.new/@prisma/orm-framework@30944

@prisma/orm-mongo

npm i https://pkg.pr.new/@prisma/orm-mongo@30944

@prisma/orm-mysql

npm i https://pkg.pr.new/@prisma/orm-mysql@30944

@prisma/orm-postgres

npm i https://pkg.pr.new/@prisma/orm-postgres@30944

@prisma/orm-postgres-contrib

npm i https://pkg.pr.new/@prisma/orm-postgres-contrib@30944

@prisma/orm-sqlite

npm i https://pkg.pr.new/@prisma/orm-sqlite@30944

@prisma/orm-target-mongo

npm i https://pkg.pr.new/@prisma/orm-target-mongo@30944

@prisma/orm-target-mysql

npm i https://pkg.pr.new/@prisma/orm-target-mysql@30944

@prisma/orm-target-postgres

npm i https://pkg.pr.new/@prisma/orm-target-postgres@30944

@prisma/orm-target-sqlite

npm i https://pkg.pr.new/@prisma/orm-target-sqlite@30944

@prisma/orm-toolchain

npm i https://pkg.pr.new/@prisma/orm-toolchain@30944

commit: f196f63

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
postgres / no-emit 279.94 KB (0%)
postgres / emit 244.21 KB (0%)
mongo / no-emit 227.33 KB (0%)
mongo / emit 184.66 KB (0%)
cf-worker / no-emit 343.02 KB (0%)
cf-worker / emit 303.17 KB (0%)

@wmadden
wmadden added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit 6677664 Nov 6, 2026
25 checks passed
@wmadden
wmadden deleted the tml-cli-follows-orm-releases branch November 6, 2026 12:16
wmadden pushed a commit to prisma/prisma-cli that referenced this pull request Nov 6, 2026
…pins an older ORM toolchain (#384)

When a product publishes a release, the version-follow pull request now
releases the CLI too:

```text
Release 8.0.0-rc.31: follow the products' released versions: @prisma/orm-toolchain 8.0.0-rc.22 -> 8.0.0-rc.23
```

`update-product-versions.yml` moves the pins as before, then runs `pnpm
bump-version`. When the pull request passes its checks and merges, the
root version changes, so `publish.yml` publishes the release under
`latest`. No person needs to cut it.

## Why

`[email protected]` pinned `@prisma/orm-toolchain` 8.0.0-rc.21 for four
days after ORM rc.22 shipped. A project on ORM rc.22 installed two
toolchains, and the CLI ran the old one ([reported on
Discord](https://discord.com/channels/937751382725886062/1477940100561244295/1566776463729102999)).

- The follow pull request #381 merged on 2026-10-31, but it shipped only
a dev build.
- The release pull request #380 waited four days for a review.

The same thing happened with rc.21 in October. A CLI behind a product
release breaks every project on that release, so the release should not
wait for someone to remember it.

## What changes

1. **The follow pull request bumps the version.** It runs `pnpm
bump-version` and stages every file it changes: the workspace manifests,
the lockfile and the version stamp in
`skills/prisma-platform-core-concepts/SKILL.md`. The title starts with
`Release <version>:`.
2. **Open release pull requests are closed as superseded.** A `Bump to
version` pull request would race the same version number. Older follow
pull requests are closed as before.
3. **Pins on `main` that no release shipped are released.** Suppose a
maintainer's release merges first and takes the version number. Then the
follow pull request's squash changes no version and ships only a dev
build, and the registry comparison finds nothing left to move. So on the
release channel, `update-product-versions.mjs` now compares `main`'s
pins with the manifests at the last release's tag, `v<version>`. The
next run, or the daily run at the latest, opens a release for those
pins. The checkout fetches tags for this.
4. **`bump-version` passes `--no-frozen-lockfile`**, because pnpm
defaults to a frozen lockfile in CI.

A release for a change in this repository alone is still cut by a
maintainer. `docs/oss/release-automation.md`, `docs/oss/versioning.md`
and the README now say this. They also say the merge still needs the one
approving review the `main` ruleset requires, which CodeRabbit gives
today.

## How it was checked

- `pnpm bump-version` with `CI=true` moved rc.30 to rc.31 and changed
exactly those files. `git add -u` stages exactly them.
- New tests for `pinChanges`, and `pnpm test:scripts` passes (89 tests).
`actionlint` and `pnpm lint` pass.
- Against the real registry: on `main` today, the release channel
reports no change. With the root version set back to rc.29, it reports
the three pins rc.30 shipped.

## Alternatives considered

- **Keep releases manual, and open the release pull request
automatically for a person to approve.** This removes the step of
remembering, but #380 shows an approval can wait for days.
- **Only alert when `prisma@latest` falls behind.** The nightly
getting-started check in prisma/getting-started-eval now does this, as a
second line of defence. Alone, it reports the problem without fixing it.

Related: prisma/orm#30944 makes the ORM's publish workflow notify this
repository at once. It read a secret that was never set, so the follow
pull request waited for the daily run. Refs TML-3439.

Agent: uther-28

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
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.

2 participants