Repository navigation
fix: deploy and report URLs for projects on prisma 8.0.0-rc.28 - #20
Merged
Merged
Conversation
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>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
wmadden
approved these changes
Oct 28, 2026
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
At a glance
A project on
prisma8.0.0-rc.28 fails every deploy through this action:After this PR the action runs
prisma deploy --entry module.tsfor that project, and still runsprisma deploy module.tsfor one on rc.27 or older.What this PR changes
prismaversion fromnode_modules/prisma/package.json. If there is no local CLI, it uses theprisma-versioninput that the bunx fallback runs.moduleinput as--entry <module>. Before that it passes it positionally, as today.Why the form depends on the version
Composer 0.35.0, which
prisma8.0.0-rc.28 ships, removed the positional module argument fromdeployanddev. The module is now named byentryin thecomposersection ofprisma.config.ts, or by--entry <path>, which overrides the config. Composer 0.34.0 has no--entryflag, so passing it unconditionally would break every repository still on rc.27.create-prisma0.14.5 scaffolds those today.--entrykeeps themoduleinput meaningful: the input still decides which module deploys, whatever the config says.destroymode builds its arguments the same way.The new code is
takesEntryFlag,installedPrismaVersionandcomposerArgumentsincli.mjs.main.mjsnow callscomposerArgumentsinstead of building the array inline.The URL outputs come from the run report
A real run on rc.28 deployed fine but reported
urls: {}, andurlnamed the wrong service. The action looked for a JSON result line on stdout, and rc.28 prints none when its output is piped.urlthen fell back to the first.prisma.buildURL 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, sodeployedUrlsFromReportindeployment.mjsnow buildsurlsfrom 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.urlis now the service nested least deeply, which still picksmy-app.appfor a single-service app. For an app with several top-level services, the report does not say which one is public, sourlis the first of them. That was already true before 0.35.urlslists all of them.Tests
New tests in
tests/cli.test.mjscover:More tests in
tests/deployment.test.mjscover reading URLs from the report, with and without the prefix.node --test tests/*.test.mjspasses, 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 deploy --entry module.ts --stage …urlsempty,urlwas the internal serviceprisma deploy --entry module.ts --stage …urlslisted<app>.gatewayand<app>.quotes; the gateway answered 200 with one of the app's quotesprisma deploy module.ts --stage …urlslistedgatewayandquotesThe docs change for the same Composer release is prisma/web#8649.
Alternatives considered
entryfromprisma.config.ts. This silently ignores themoduleinput, and it fails for projects whose config does not setentryyet.--entry. This breaks every repository still on rc.27.Agent: janeway-45