Repository navigation
feat(dev): provision a Prisma shadow database for dev leases - #55
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
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.
Prisma
migrate devfails with P3014 because dev lease roles cannot create databases. Dev acquisition now provisions a dedicated role-owned shadow database alongside the main database on one admin connection, preserving the worktree hash when names need shortening.AcquireResult.shadowDatabaseUrl, CLI JSON/env output,cedarpg run/run --attach, and the dev env file/loaders expose the shadow URL. Re-acquiring keeps both databases; existing role-scoped fresh acquisition, dispose, and GC remove both. README and changelog document the Prisma config opt-in and the one-time re-acquire for existing leases.Validation:
vp check: formatting, lint, and type checking pass.vp test: 145 tests pass across 23 files.vp run smoke: dual ESM/CJS packaging and export resolution pass.vp run smoke:pg: Vitest, Jest, TEMPLATE clone reuse/reset, CLI URL forwarding, and dev shadow checks pass. Prisma 7 generates an initial migration, deploys it, and generates a second migration throughrun --attach, withCREATEDBstill disabled. Live checks also verify re-acquire preserves data and fresh/dispose/GC clean up both databases.The registered host was unavailable locally, so the live smoke ran against a temporary cluster using autopg's bundled Postgres binary and an attach-only discovery shim. The shared host was not restarted or upgraded, and temporary cluster cleanup stayed under
/tmp.Closes #54