Skip to content

fix: repair astro dev, turborepo runtime paths, and prisma postgres migration retry#51

Open
AmanVarshney01 wants to merge 1 commit into
mainfrom
fix/template-e2e-fixes
Open

fix: repair astro dev, turborepo runtime paths, and prisma postgres migration retry#51
AmanVarshney01 wants to merge 1 commit into
mainfrom
fix/template-e2e-fixes

Conversation

@AmanVarshney01

Copy link
Copy Markdown
Member

End-to-end sweep of all 9 templates (scaffold → install → generate → migrate → seed → build → dev server → prod server, asserting seeded users over HTTP). 7/9 passed; astro and turborepo had real bugs, fixed here. Also bumps the only stale exact pins and replaces the provisioning sleep hack.

astro: astro dev crashed at startup

vite.ssr.noExternal: true (the workaround for Prisma Compute's Bun runtime failing on cookie's CJS named exports) forces CJS deps through Vite's ESM module runner in dev → exports is not defined in cookie/dist/index.js, so the dev server never booted. Moved the setting into an inline integration that applies it only for astro build. Verified: dev serves /api/users from the seeded DB, the built server output still bundles cookie inline (no external import remains in dist/server), and preview works. Once prisma/project-compute#111 (stable Bun runtime) ships, this workaround can be deleted entirely.

turborepo: three runtime bugs

  1. Empty database at runtime. DATABASE_URL="file:./dev.db" is relative; the CLI (migrate/seed, cwd packages/db) created packages/db/dev.db, but @prisma/adapter-libsql resolves the path against the process cwd — turbo runs the api in apps/api, so GET /users hit a fresh empty apps/api/dev.db and 500'd. client.ts now resolves relative file: paths against the db package dir. (Underlying CLI/adapter inconsistency is worth an upstream prisma/prisma issue.)
  2. PORT silently ignored. turbo 2.x strict env mode strips undeclared vars, so PORT=x bun run dev listened on 3000. Added globalPassThroughEnv: ["PORT", "DATABASE_URL"].
  3. start crashed under Node. node dist/src/index.js can't resolve @repo/db's raw-TS export (ERR_MODULE_NOT_FOUND on the extensionless ./client import). start now uses tsx, same as dev.

Verified: root PORT=8129 bun run dev serves seeded users on 8129, start works, no stray apps/api/dev.db is created.

next: stale exact pins

next/eslint-config-next 16.2.9 → 16.2.10 (everything else uses caret ranges that already resolve to latest; Prisma is on current 7.8.0). Also clears the eslint peer-dep warnings during install. Re-verified scaffold + build + dev.

prisma postgres: retry instead of blind sleep

The first migrate dev against a freshly provisioned database raced provisioning readiness, papered over with a fixed 2s sleep. Root cause fixed in prisma/create-db#84 (create-db now blocks until the DB answers SELECT 1); here the sleep is replaced with bounded retries (1s/2s/4s backoff, Prisma Postgres flow only), which is net faster in the common case and covers older create-db versions. Verified with a live run: provision → migrate → seed all green.

Testing

  • bun run check + typecheck clean
  • All 9 templates re-verified e2e with SQLite (4 delegated to codex CLI, 5 to parallel agents)
  • Live Prisma Postgres flow: --provider postgresql --prisma-postgres → provisioned, migrated, seeded, exit 0

…igration retry

Verified end to end by scaffolding all nine templates and exercising
build, dev, and production servers against seeded databases.
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 45 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 115e9656-35bf-493b-9b57-1b85e1180599

📥 Commits

Reviewing files that changed from the base of the PR and between a917311 and 0a5b131.

📒 Files selected for processing (6)
  • src/tasks/setup-prisma.ts
  • templates/create/astro/astro.config.mjs.hbs
  • templates/create/next/package.json.hbs
  • templates/create/turborepo/apps/api/package.json.hbs
  • templates/create/turborepo/packages/db/src/client.ts.hbs
  • templates/create/turborepo/turbo.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/template-e2e-fixes
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/template-e2e-fixes

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

@github-actions

Copy link
Copy Markdown

PR preview published

  • Version: 0.7.1-pr.51.166.1
  • Tag: pr51
  • Run with Bun: bunx create-prisma@pr51
  • Run with npm: npx create-prisma@pr51
  • Run with Yarn: yarn dlx create-prisma@pr51
  • Run with pnpm: pnpm dlx create-prisma@pr51
  • Run with Deno: deno run -A npm:create-prisma@pr51
  • Workflow run: https://github.com/prisma/create-prisma/actions/runs/29706082407

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.

1 participant