Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughIntroduces a CI workflow step to remove Prisma migration metadata before diffing, sets STACK_SEED_MODE in the backend seed script and removes its auto-execution block, and fixes a string concatenation bug in a Convex example function. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant GH as GitHub Actions
participant Job as Workflow Job
participant DB as Target DB
participant Prisma as Prisma CLI
GH->>Job: Start check-prisma-migrations
Job->>DB: Initialize database
rect rgba(200,240,255,0.3)
note right of Job: New step
Job->>Prisma: Execute SQL to drop SchemaMigration
Prisma->>DB: DROP TABLE SchemaMigration (if exists)
end
Job->>Prisma: prisma migrate diff (schema vs DB)
Prisma-->>Job: Diff result
Job-->>GH: Pass/Fail
sequenceDiagram
autonumber
participant App as App Runtime
participant Seed as seed()
note over App,Seed: Seed script behavior change
rect rgba(230,230,230,0.3)
note over App: Before
App->>Seed: Module executes seed() at import/run
Seed-->>App: Completes (handles errors & disconnects)
end
rect rgba(220,255,220,0.3)
note over App: Now
App->>Seed: Explicit call only (no auto-run)
Seed->>Seed: Set STACK_SEED_MODE='true'
Seed-->>App: Completes (caller manages lifecycle)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🪛 Checkov (3.2.334).github/workflows/check-prisma-migrations.yaml[medium] 65-66: Basic Auth Credentials (CKV_SECRET_4) ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
🔇 Additional comments (3)
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 |
There was a problem hiding this comment.
Review by RecurseML
🔍 Review performed on 6b08d8b..4ebc2a8
✨ No bugs found, your code is sparkling clean
✅ Files analyzed, no issues (2)
• .github/workflows/check-prisma-migrations.yaml
• apps/backend/src/auto-migrations/index.tsx
<!-- Make sure you've read the CONTRIBUTING.md guidelines: https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md --> <!-- RECURSEML_SUMMARY:START --> ## High-level PR Summary This PR fixes database schema issues related to Prisma migrations by setting the correct `search_path` before applying auto-migrations and removing the `SchemaMigration` table from the CI workflow to ensure proper schema comparison during migration checks. ⏱️ Estimated Review Time: 5-15 minutes <details> <summary>💡 Review Order Suggestion</summary> | Order | File Path | |-------|-----------| | 1 | `apps/backend/src/auto-migrations/index.tsx` | | 2 | `.github/workflows/check-prisma-migrations.yaml` | </details> [](https://discord.gg/n3SsVDAW6U) [](https://squash-322339097191.europe-west3.run.app/interactive/d1ed7a31dbea01bc38c87afa5ef5f493d67bca1a1f57d00ee521864bb9e14ca1/?repo_owner=stack-auth&repo_name=stack-auth&pr_number=955) <!-- RECURSEML_SUMMARY:END --> <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Fixes Prisma migration schema issues and a string concatenation error in `getUserInfo`. > > - **Database Schema**: > - Removes `SchemaMigration` table in `.github/workflows/check-prisma-migrations.yaml` to ensure correct schema comparison. > - Sets `STACK_SEED_MODE` to `'true'` in `seed()` in `seed.ts` for consistent seeding behavior. > - **Bug Fix**: > - Fixes string concatenation error in `getUserInfo` in `myFunctions.ts` by using `+` instead of `obj.displayName`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=stack-auth%2Fstack-auth&utm_source=github&utm_medium=referral)<sup> for 5b664a0. You can [customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this summary. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Corrected user info message to properly display the user’s name in the example app. * **Chores** * CI workflow now clears auto-generated migration metadata before comparing schema changes to reduce false positives. * Seeding now explicitly sets a seed-mode environment flag and no longer auto-executes on direct invocation, enabling more controlled runs. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
High-level PR Summary
This PR fixes database schema issues related to Prisma migrations by setting the correct
search_pathbefore applying auto-migrations and removing theSchemaMigrationtable from the CI workflow to ensure proper schema comparison during migration checks.⏱️ Estimated Review Time: 5-15 minutes
💡 Review Order Suggestion
apps/backend/src/auto-migrations/index.tsx.github/workflows/check-prisma-migrations.yamlImportant
Fixes Prisma migration schema issues and a string concatenation error in
getUserInfo.SchemaMigrationtable in.github/workflows/check-prisma-migrations.yamlto ensure correct schema comparison.STACK_SEED_MODEto'true'inseed()inseed.tsfor consistent seeding behavior.getUserInfoinmyFunctions.tsby using+instead ofobj.displayName.This description was created by
for 5b664a0. You can customize this summary. It will automatically update as commits are pushed.
Summary by CodeRabbit
Bug Fixes
Chores