Skip to content

Add prisma deploy list: show every deployed node of a stage with its address and platform ID - #388

Merged
wmadden-electric merged 20 commits into
mainfrom
drive/deploy-list
Oct 27, 2026
Merged

wmadden-electric merged 20 commits into
mainfrom
drive/deploy-list

Conversation

@wmadden-electric

Copy link
Copy Markdown
Contributor
$ prisma deploy list --stage qa-99d5e9
Address                     Kind      Platform ID                    URL
a2-qa-99d5e9                project   proj_x46eyjv91k1femz0acf82vdt  —
a2-qa-99d5e9.auth           module    —                              —
a2-qa-99d5e9.auth.database  postgres  db_…                           —
a2-qa-99d5e9.auth.service   service   cps_…                          https://….ewr.prisma.build
a2-qa-99d5e9.storefront     service   cps_…                          https://….ewr.prisma.build

This adds prisma deploy list. It prints every node of a deployed app on one stage, with its address, kind, platform ID and URL. Without --stage it lists production. --json prints the same rows for scripts and agents.

Why

Since the address change in #384, every deployed node is named on the platform by its full address, such as shop.catalog.db. But nothing showed those addresses. Users and agents could only work them out by reading the code. This command shows them, and the platform ID next to each one. The planned platform commands that take an address (prisma service logs @pr-42:shop.api) need that.

How it works

A deploy already uploads the app's topology to the platform for each stage: one entry per node, keyed by the node's address. deploy list reads that topology. It then looks up each node's platform row (the Project, a service, a database or a bucket) by its logicalId on that stage's Branch.

  • It finds the app and the stage the same way deploy does. The app name comes from the entry in prisma.config.ts, and --name and --entry work as on deploy. --stage is checked the same way too.
  • It does not read the deploy state. Reading that requires the deploy lock, so it would clash with a deploy that is running.
  • A node with no platform row, such as a module, lists with no ID. Only services have a URL, and it is the URL deploy prints.
  • If no app, stage or topology is found, the command fails with DEPLOY.TARGET_NOT_FOUND.

The command lives in @prisma/composer-cli, next to emulator list, because it reads Prisma Cloud data. Two internal subpaths, @internal/lowering/deployed and @internal/cli/app-identity, give it the platform reads and the app-name lookup. They don't pull Alchemy into the CLI's startup. The table of which resource types get a database or bucket row is now one shared map, RESOURCE_ROW_KINDS, used by the command, the e2e scripts and the local emulators.

One step left: the prisma binary

The prisma binary from prisma/prisma-cli mounts each Composer command by name. prisma deploy list works only once prisma-cli adds "deploy list" next to "emulator list". That is a one-line follow-up PR, opened after a Composer release includes this command. Until then, the new CI check runs Composer's command code directly.

Testing

  • Unit tests cover the join and the kind mapping, the command's three outputs, an invalid stage, a missing workspace, and every "nothing deployed" case.
  • A new step in the e2e deploy action, "Verify deploy list", runs the command after every e2e deploy. It checks each node's kind, ID and URL against the platform.
  • Manual QA on the real platform deployed storefront-auth to production and to a named stage, listed both, and checked a stage that doesn't exist. The named stage listed only its own rows. The test Project was deleted afterwards. The details are in .drive/projects/node-addressing/slices/a2-deploy-list/qa.md.

Alternatives considered

  • Reading the deploy state instead of the topology. Rejected: it needs the deploy lock and would block or clash with a running deploy.
  • A framework extension hook for "read what is deployed". Rejected for one command. emulator list set the pattern of putting Prisma Cloud commands in composer-cli.
  • deploy show. Rejected: list is the verb for a collection.

Agent: victoria-52

🤖 Generated with Claude Code

wmadden-electric and others added 18 commits October 27, 2026 12:08
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…ity for deploy list

@internal/lowering/deployed reads a stage's Project and Branch with the
find-only container lookup, its application topology, and the Branch's
services, databases and buckets. @internal/cli/app-identity exposes
resolveAppIdentity outside the public control surface.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Lets deploy list treat no Project, no Branch and no topology the same way
from one place, and test the no-topology case in its pure join.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…tage

Each node of the stage's application topology is one row, joined by
logicalId to its service, database or bucket on the Branch; the root is
the Project. Human output is a table, stdout one tab-separated line per
node, --json an array of { address, kind, platformId, url }. No Project,
Branch or topology fails with DEPLOY.TARGET_NOT_FOUND.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Committed fixtures outside a __tests__ directory are unclassified source
to the architecture coverage check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…lookup

The same git ref check deploy runs, so a bad stage name fails with
DEPLOY.STAGE_INVALID instead of reading as "nothing deployed".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…turns it

A service row's appEndpointDomain is already a full https URL, the one
deploy prints. Prefixing https:// again listed https://https://... against
a real deploy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
e2e-verify-identity's Management API reads move to platform-state.ts so
the deploy list check can compare against the same topology and rows. App
rows now keep their endpoint URL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…l deploy

The installed prisma does not mount deploy list yet, so the script mounts
Composer's command family itself with a service-token credential. It
checks that every topology node is listed in order, that each ID is the
Project or the row with the node's logicalId on the stage Branch, and that
each service URL is its https endpoint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
ADR-0053 and ADR-0050 get dated amendments for deploy list, the index
entries follow, and deploy-cli.md says what it reads and how it fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
A Listing what is deployed section in the deploying guide, a row in the
piped output table, and the same facts in the agent skill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…tform row

deploy list, the local emulators and the e2e identity check each kept their
own copy of which resource types deploy to a database or bucket row. They
now read RESOURCE_ROW_KINDS from @internal/lowering/deployed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…dential has no workspace

It now fails with the same message deploy gives in that case, instead of
saying only that the credential names no workspace. The human-table test
now checks the header row and whole rows, not two substrings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
… Branch

It returned undefined, which deploy list reads as nothing deployed and so
would hide the bug. It now rejects with an error naming the project.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@prisma-gizmo

prisma-gizmo Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

✅ Gizmo reviewed 844b31e — posted 0 inline comment(s) this pass.

Open findings: none

Change walkthrough

This incremental pass reviews the final polish on prisma deploy list: the review-record updates, release-wording corrections in the docs and skill, and a fix to the e2e verification script that makes it load configs containing an orm section.

Review record — .drive/.../reviews/code-review.md replaces the empty "Already addressed" section with per-finding fix commits (F01–F07). The cited commits exist on the branch with matching subjects, and the F03 claim checks out: RESOURCE_ROW_KINDS lives in lowering/src/resource-rows.ts and is consumed by the command, the emulators, and scripts/platform-identity.ts.

Docs and skill — deploying.md and SKILL.md reword the release claim from the speculative "first ships in the release after 8.0.0-rc.26" to the verifiable "needs a prisma CLI release that includes it; 8.0.0-rc.26 does not". Both files now say the same thing, which matches the workspace's prisma: 8.0.0-rc.26 catalog pin and the e2e script's own comment that the installed binary does not mount the command yet. This addresses review finding F07 without inventing a future version.

E2E script — scripts/e2e-verify-deploy-list.ts mounts a second, command-less family declaring ormConfigSection next to the Composer family, so the engine's config loader accepts example configs with an orm section. That is a real need, not defensive padding: the deploy-verify-destroy action runs the script with the example's working directory as cwd, and the e2e matrix includes examples/orm-demo, whose prisma.config.ts sets an orm: section. The new @prisma/orm-toolchain import resolves the same way the script's pre-existing undeclared @prisma/cli-engine import does (.npmrc sets node-linker=hoisted, giving a flat root node_modules), and the lockfile pins the package at 8.0.0-rc.20 in agreement with every other @prisma/orm-* pin, so the ORM-pin lint stays satisfied.

@coderabbitai

coderabbitai Bot commented Oct 27, 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: 4dc62e0e-6377-4720-9a9a-5bb735bcb5b3
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@pkg-pr-new

pkg-pr-new Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@prisma/composer@388
npm i https://pkg.pr.new/@prisma/composer-cli@388
npm i https://pkg.pr.new/@prisma/composer-prisma-cloud@388

commit: 844b31e

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New findings: 🟡 2 minor · trace

Comment thread docs/guides/deploying.md Outdated
wmadden-electric and others added 2 commits October 27, 2026 12:59
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
orm-demo's prisma.config.ts has an orm section. With only Composer's
family mounted, the engine rejected it as CLI.CONFIG_UNKNOWN_SECTION.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New findings: none · trace

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No Gizmo finding is open and the head commit has been reviewed. Approving.

@wmadden-electric
wmadden-electric merged commit 916696e into main Oct 27, 2026
25 checks passed
@wmadden-electric
wmadden-electric deleted the drive/deploy-list branch October 27, 2026 13:37
wmadden-electric added a commit that referenced this pull request Oct 27, 2026
Brings in dev servers (#381), full node addresses (#384, ADR-0057), the deploy entry in prisma.config.ts (#387) and prisma deploy list (#388). The secrets decision becomes ADR-0058, and every reference to it moves with it.

A dev server gets its environment from materializeEnv, so it receives the same per-service secret values from process.env, an unset optional secret is absent, and a changed value restarts it; the serve test now covers both. The docs that described placeholders for dev servers now describe reading secrets before the dev server starts. Tests and expected error text use full addresses.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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