Skip to content

Last deployment failure#679

Merged
kentcdodds merged 1 commit intomainfrom
cursor/last-deployment-failure-7d0a
Feb 24, 2026
Merged

Last deployment failure#679
kentcdodds merged 1 commit intomainfrom
cursor/last-deployment-failure-7d0a

Conversation

@kentcdodds
Copy link
Owner

@kentcdodds kentcdodds commented Feb 24, 2026

Run Prisma migrations before priming the cache in CI to fix deployment failures due to missing database tables.


Open in Web Open in Cursor 


Note

Low Risk
Workflow-only change that adds a deterministic migration step; main risk is longer CI runs or unexpected migration failures in these jobs.

Overview
Fixes CI/deployment failures caused by priming the site cache against an unmigrated database.

Both deployment.yml (pre-deploy health check) and index-semantic-content.yml now run npx prisma migrate deploy when the site-cache is a miss, before running prime-cache:mocks (and before the production build in the indexing workflow).

Written by Cursor Bugbot for commit 5839c7f. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • Chores
    • Added automated database migration step to CI/CD workflows that runs on cache misses to ensure database schema is synchronized before deployment and build processes.

Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@cursor
Copy link

cursor bot commented Feb 24, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@coderabbitai
Copy link

coderabbitai bot commented Feb 24, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 81bbb3d and 5839c7f.

📒 Files selected for processing (2)
  • .github/workflows/deployment.yml
  • .github/workflows/index-semantic-content.yml

📝 Walkthrough

Walkthrough

Two GitHub Actions workflows are updated with conditional database migration steps that execute when site cache misses occur. Each workflow gains a "🛠 Setup Database (migrations)" step running npx prisma migrate deploy before existing build or cache generation steps, triggered by cache-hit detection logic.

Changes

Cohort / File(s) Summary
Workflow Migration Steps
.github/workflows/deployment.yml, .github/workflows/index-semantic-content.yml
Added conditional "🛠 Setup Database (migrations)" steps that run npx prisma migrate deploy when site cache misses (site-cache.outputs.cache-hit != 'true'), positioned before subsequent build/cache steps.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • Pre-deployment health check #610: Implements Prisma migrations as part of the pre-deploy health-check CI flow, directly preceding this PR's migration additions.
  • Pre-deploy cache warm-up #621: Modifies the same pre-deploy-health-check workflow and introduces the "Generate Site Cache" step that this PR's migrations now precede.
  • Content reindex cache priming #659: Updates the index-semantic-content.yml workflow with conditional cache-miss logic that this PR extends with database migration steps.

Poem

🐰 Hop, hop, migrations flow,
When caches miss, the databases grow,
Before we build, the schema's set right,
Cold starts now bloom with database might!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cursor/last-deployment-failure-7d0a

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.

❤️ Share

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

@kentcdodds kentcdodds marked this pull request as ready for review February 24, 2026 06:21
@kentcdodds kentcdodds merged commit 24560b2 into main Feb 24, 2026
7 of 8 checks passed
@kentcdodds kentcdodds deleted the cursor/last-deployment-failure-7d0a branch February 24, 2026 23:57
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.

2 participants