Skip to content

deploy creates the project before the state bootstrap — a bootstrap failure orphans a project + database #103

Description

@wmadden-electric

Observed 2026-07-16 while deploying examples/streams: prisma-composer deploy creates the Prisma Cloud project before bootstrapping the hosted state store. When the state bootstrap then fails (in this case a workspace-wide PPg planLimitReached, so the state DB itself was unreachable), the deploy aborts with HostedStateBootstrapError … ownership verification failed — but the project and its auto-provisioned default database are already created and are left behind.

Consequences:

  • The orphan is invisible to the framework (no state was ever written), so destroy cannot clean it up — it must be deleted through the Management API by hand.
  • The orphaned database consumes one of the workspace’s limited PPg database slots. When the failure cause is a database limit, each retry orphans another project+database and makes the situation worse.

Suggested shape: bootstrap/verify the state store before creating any platform resources, or make the project creation part of the state-tracked plan so a failed deploy rolls it back (or is recoverable by a subsequent destroy).

Related: #88 (pre-rename state orphaning), FT-5227 (the planLimitReached masking that made this failure mode hard to diagnose).

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions