← Back to Pull requests

docs: rewrite the Composer and Compute pages for how Composer 0.40 handles environment variables and versions #8960

Closed
unknown closed this pull request without merging on Nov 28, 2026 21:42 UTC
View on GitHub
unknown unknown commented on Nov 28, 2026 21:11 UTC
Author

This rewrites the Composer and Compute docs around how the current releases actually handle an app's environment variables and versions, instead of patching single sentences. Prisma Composer is the tool behind prisma deploy for apps on Prisma Compute.

The pages on main show an app reading a credential like this, and say the first deploy copies the value from your shell:

// email is a part of the app that needs a credential
export default module('shop', ({ provision }) => {
  provision(email, { input: { deliveryCredential: envSecret('EMAIL_DELIVERY_CREDENTIAL') } });
});

Neither is true any more. Composer 0.40.0 removed envSecret(), and since Composer 0.39 a deploy never copies a value to Compute. The app now declares the variable in its top-level module, the "root", which is built with appRoot():

export default appRoot('shop', ({ provision }) => {
  const deliveryCredential = provision(variable.secret({ name: 'EMAIL_DELIVERY_CREDENTIAL' }));
  provision(email, { input: { deliveryCredential } });
});

and you set its value yourself before the deploy that needs it. With the variable exported in your shell:

npx prisma project env add EMAIL_DELIVERY_CREDENTIAL --role production

A deploy that is missing the value stops and prints that command.

The two kinds of value

Everything in the rewrite follows from there being two:

  • A platform variable, as above (variable(), or variable.secret() for a credential): stored on Prisma Compute, read by the service when it starts.

  • A root input field: read from your shell, or from .env files you list, by each deploy. The value is not stored as a variable on Compute, so every deploy, including in CI, must be able to read it.
  • What a reader gets

  • The ten pages that used envSecret() or envParam() (Composer's other removed function, for non-secret values) now show the new code.

  • The service input page explains both kinds and ends with upgrade steps from the removed functions.

  • The deploying page says how to set variables, what a deploy checks first, and that a new app's first deploy creates the project and then stops if a value is missing.

  • The guide for deploying an existing app, and the Prisma ORM 7 upgrade guides, told readers to install prisma 8.0.0-rc.27, @prisma/orm-postgres 8.0.0-rc.20 and Composer 0.34.0. The repository setup in the Prisma Console, which prepares an app for deploy on push, refuses those. They now name rc.36, rc.25 and 0.40.0.

  • The same deploy guide had two commands that fail: prisma dev module.mjs is now prisma dev, and prisma dev url database is now prisma dev url feedback-board.database.

  • The tutorials that built their root with module() now use appRoot(), so every page shows the root the same way.

  • The deploy guide now says that an app whose schema uses a Prisma ORM extension pack (citext, pgvector) must pass the pack's runtime to the client, or the service fails on first use.

  • The PostgreSQL upgrade guide's notes about column types and defaults now describe rc.25: for example, DateTime columns read as a Date and @db.Date columns as text.
  • The choice worth checking

    The upgrade steps turn envParam('EMAIL_FROM') into a root input field, not a platform variable, because a root input field behaves the same: each deploy reads your shell and nothing has to be created on Compute. The cost is that CI must keep supplying the value. The steps name the platform variable as the alternative, for a value you would rather store on Compute. This follows the migration guide in prisma/composer#431, which merged on 17 November.

    Not verified

    Nothing was deployed, because that needs a real account and creates real resources. So the commands in the deploy guide, the output shown in the PostgreSQL upgrade guide and the address format for prisma service logs rest on reading the source and Composer's docs, not on a run.

    Otherwise: a reviewer who did not write the pages compared every changed claim with the source of Composer 0.40.0, the ORM 8.0.0-rc.25, the CLI 8.0.0-rc.36 and the Console's setup code; the new app examples type-check against Composer 0.40.0; fresh readers reviewed the text three times and what would have blocked them is fixed (some terms, such as "deploy state", stay undefined); and the docs' link and version checks pass.

    Not included

  • The CLI error reference still tells readers to use envSecret(). The page is generated from prisma/prisma-cli, so it has to be fixed there. No issue is filed yet.
  • This is the rewrite that prisma/web#8958, which corrected single out-of-date statements, left out.

    Alternatives considered

  • Swap the function names only. The pages would compile but still say a deploy copies values, so a first deploy would still surprise the reader.

  • Turn envParam() into a platform variable in the upgrade steps. One concept for readers to learn, but their deploy would stop until they created on Compute a value that has never been there.

  • Ship the version bumps separately. Both changes are on the deploy guide, and that page is only correct with both.
  • <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    Documentation
    Updated Prisma Compute deployment guidance to explain how required platform variables are provisioned, what happens when values are missing, and how to redeploy after setting them. Clarified that deployments do not copy values from the shell or .env files.
    Clarified how root inputs, platform variables, credentials, and service inputs are declared and used, including Composer 0.40.0 migration guidance and the reserved DATABASE_URL name.
    Expanded local development, CI, and deployment documentation, including variable scopes, validation behavior, and secret provisioning.
    * Updated Composer examples to use the current root-app declaration, and refreshed Prisma 8 and PostgreSQL upgrade instructions, version requirements, and date/time query notes.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: wmadden-electric Review duration: 30m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #8960"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 20.5% · Safe to merge
    20.5%
    Repository