Skip to content

fix: deploy and report URLs for projects on prisma 8.0.0-rc.28 - #20

Merged
wmadden-electric merged 2 commits into
mainfrom
claude/entry-flag-for-rc28
Oct 28, 2026
Merged

wmadden-electric merged 2 commits into
mainfrom
claude/entry-flag-for-rc28

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

At a glance

A project on prisma 8.0.0-rc.28 fails every deploy through this action:

$ bun run --bun prisma deploy module.ts
✘ [CLI.INVALID_ARGUMENTS] Too many arguments, expected 0 but encountered "module.ts"

After this PR the action runs prisma deploy --entry module.ts for that project, and still runs prisma deploy module.ts for one on rc.27 or older.

What this PR changes

  1. The action reads the installed prisma version from node_modules/prisma/package.json. If there is no local CLI, it uses the prisma-version input that the bunx fallback runs.
  2. From 8.0.0-rc.28 it passes the module input as --entry <module>. Before that it passes it positionally, as today.

Why the form depends on the version

Composer 0.35.0, which prisma 8.0.0-rc.28 ships, removed the positional module argument from deploy and dev. The module is now named by entry in the composer section of prisma.config.ts, or by --entry <path>, which overrides the config. Composer 0.34.0 has no --entry flag, so passing it unconditionally would break every repository still on rc.27. create-prisma 0.14.5 scaffolds those today.

--entry keeps the module input meaningful: the input still decides which module deploys, whatever the config says. destroy mode builds its arguments the same way.

The new code is takesEntryFlag, installedPrismaVersion and composerArguments in cli.mjs. main.mjs now calls composerArguments instead of building the array inline.

The URL outputs come from the run report

A real run on rc.28 deployed fine but reported urls: {}, and url named the wrong service. The action looked for a JSON result line on stdout, and rc.28 prints none when its output is piped. url then fell back to the first .prisma.build URL in the log, which was an internal service.

Composer also writes a run report to PRISMA_COMPOSER_REPORT_FILE, and the action already reads it for the job summary. The report lists every service's URL, so deployedUrlsFromReport in deployment.mjs now builds urls from it. The stdout parsing stays as the fallback.

Composer 0.35.0 also prefixes every address with the app's name (my-app.gateway), so "the address without a dot" no longer picks anything. url is now the service nested least deeply, which still picks my-app.app for a single-service app. For an app with several top-level services, the report does not say which one is public, so url is the first of them. That was already true before 0.35. urls lists all of them.

Tests

New tests in tests/cli.test.mjs cover:

  • the rc.27 and rc.28 boundary, plus releases after 8.0.0;
  • both argument forms, with and without a stage;
  • reading the installed version, and returning an empty string when there is none.

More tests in tests/deployment.test.mjs cover reading URLs from the report, with and without the prefix. node --test tests/*.test.mjs passes, 80 tests.

Three real runs used this branch (uses: prisma/cloud-deploy-action@claude/entry-flag-for-rc28) on a throwaway branch of prisma/getting-started-eval, against the nightly's workspace. The test app was the two-service Composer getting-started app. Each run deleted its project afterwards.

prisma / Composer Command the action ran Result
rc.28 / 0.35.0, before the URL fix prisma deploy --entry module.ts --stage … deployed; urls empty, url was the internal service
rc.28 / 0.35.0 prisma deploy --entry module.ts --stage … deployed; urls listed <app>.gateway and <app>.quotes; the gateway answered 200 with one of the app's quotes
rc.27 / 0.34.0 prisma deploy module.ts --stage … deployed; urls listed gateway and quotes

The docs change for the same Composer release is prisma/web#8649.

Alternatives considered

  • Pass nothing and let the CLI read entry from prisma.config.ts. This silently ignores the module input, and it fails for projects whose config does not set entry yet.
  • Always pass --entry. This breaks every repository still on rc.27.

Agent: janeway-45

Composer 0.35.0, which prisma 8.0.0-rc.28 ships, rejects a positional module on deploy. The action reads the installed prisma version and passes --entry <module> from rc.28 on, and the module positionally before it.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 6c79205e-5050-4af6-8300-d8e99bfd1510
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

prisma 8.0.0-rc.28 prints no JSON result line when its output is piped, so the urls output came back empty and url fell back to the first URL in the text. The run report lists every service's URL, so the action reads it first. With app-name-prefixed addresses, url is the service nested least deeply.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@wmadden-electric wmadden-electric changed the title fix: deploy projects on prisma 8.0.0-rc.28, which takes the module as --entry fix: deploy and report URLs for projects on prisma 8.0.0-rc.28 Oct 28, 2026
@wmadden-electric
wmadden-electric merged commit 20fa45c into main Oct 28, 2026
6 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.

2 participants