Skip to content

Fix the action against the current prisma CLI (top-level deploy, 8.0.0-rc.9) - #12

Merged
kristof-siket merged 3 commits into
mainfrom
fix/current-prisma-cli
Aug 25, 2026
Merged

Fix the action against the current prisma CLI (top-level deploy, 8.0.0-rc.9)#12
kristof-siket merged 3 commits into
mainfrom
fix/current-prisma-cli

Conversation

@kristof-siket

@kristof-siket kristof-siket commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

What

Every released tag (v1.0.0–v1.5.0, the floating v1) and main are broken against the current prisma CLI. This PR makes the action work again, staying fully on Bun:

  • Use the top-level commands. Since 8.0.0-rc.8 the deploy commands are top-level (prisma deploy); the composer subcommand family was removed, so the old invocation fails instantly with CLI.UNKNOWN_COMMAND in any repository with a current prisma devDependency (the action prefers the local bin).
  • Bump the bunx fallback from 8.0.0-rc.7 (the last version with the old commands) to 8.0.0-rc.9, and sync the dead inline fallback in main.mjs.
  • Require Bun >= 1.3.10, with a named error. Bun <= 1.3.9 omits Content-Length on the CLI's presigned-URL artifact upload, so every deploy fails with an opaque "Prisma artifact upload failed (HTTP 411)" (fixed in Bun 1.3.10). Runners get an old Bun from pins — package.json packageManager, .bun-version, or setup-bun's bun-version input — even though setup-bun defaults to latest. The action now checks bun --version up front and fails with the cause and the fix; an unreadable version only warns.
  • README aligned with all of the above.

Verified

  • All 48 tests pass (node --test tests/*.test.mjs).
  • Verified end-to-end in the real pipeline (kristof-siket/my-app-prisma-blog, Bun >= 1.3.10 on the runner): production deploy under Bun green. Earlier verification with this command shape also covered preview stage deploys and OIDC auth.
  • bunx -p prisma@8.0.0-rc.9 prisma --help confirms the top-level deploy command shape.
  • Local Bun 1.3.11 deploys of a real Composer app succeed; the pinned-bun@1.3.9 fixture reproduced the HTTP 411.

Known issue (intentionally not addressed here)

mode: destroy cannot work against the current CLI: 8.0.0-rc.9 has no top-level destroy and no branch delete. The invocation is kept updated in form and the README documents the limitation; the teardown story is being followed up separately. In practice, Console-connected repositories get preview teardown from the platform's branch automation on branch deletion.

Follow-up

#13 (stacked on this) adds the release-policy guardrails: CLI version validation with a clear error, a canary workflow against prisma@next, and a compatibility matrix.

🤖 Generated with Claude Code

Since prisma 8.0.0-rc.8 the Composer commands are top-level: the former
`prisma composer deploy` is now `prisma deploy`, and the `composer`
subcommand was removed. Running the old form against a current CLI fails
with CLI.UNKNOWN_COMMAND. Drop the prefix in both invocations and bump
the bunx fallback default to 8.0.0-rc.9.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
kristof-siket and others added 2 commits August 25, 2026 12:14
Bun <= 1.3.9 omits Content-Length on the CLI's presigned-URL artifact
upload, so every deploy fails with an opaque "Prisma artifact upload
failed (HTTP 411)" — the failure that broke deploys when 8.0.0-rc.9's
effect bump made the upload sensitive to it. Runners get old Bun from
pins (package.json packageManager, .bun-version, setup-bun's
bun-version input) even though setup-bun defaults to latest. Check
`bun --version` up front and fail with the cause and the fix; an
unreadable version only warns.

Also syncs main.mjs's inline prisma-version fallback (dead in real
runs, where action.yml always populates the input) to 8.0.0-rc.9.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Document the top-level `prisma deploy` command (the `composer` prefix
was removed in 8.0.0-rc.8), the bumped 8.0.0-rc.9 fallback, the
bun >= 1.3.10 requirement (older Bun fails uploads with HTTP 411),
and the known limitation that destroy has no CLI command to invoke on
8.0.0-rc.9.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kristof-siket
kristof-siket force-pushed the fix/current-prisma-cli branch from 0f2a5c4 to e81bbfd Compare August 25, 2026 10:14
@kristof-siket

Copy link
Copy Markdown
Collaborator Author

Reworked after root-causing: the HTTP 411 was a Bun <= 1.3.9 bug (Content-Length omitted on the upload), not a CLI-side issue. The temporary Node invocation is gone — the action stays on Bun and instead enforces bun >= 1.3.10 with an error naming the bug. Pipeline re-verification under Bun is running now.

@kristof-siket
kristof-siket merged commit fd4ae30 into main Aug 25, 2026
5 checks passed
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