feat(run-ops): dedicated run-ops database package + docker service + migration runner#4113
Conversation
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (33)
|
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Description check | It omits required template sections like Closes #, checklist, changelog, and screenshots, and doesn't follow the repository template. | Add the missing template sections: Closes #, checklist items, Testing steps, Changelog, and Screenshots, then fill them in. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title is specific and matches the main change: a dedicated run-ops database package with Docker support and migration tooling. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
runops/pr02-db-foundation
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 @coderabbitai help to get the list of available commands.
@trigger.dev/build
trigger.dev
@trigger.dev/core
@trigger.dev/python
@trigger.dev/react-hooks
@trigger.dev/redis-worker
@trigger.dev/rsc
@trigger.dev/schema-to-json
@trigger.dev/sdk
commit: |
32525bb to
9b2b67d
Compare
|
Thanks for the review. On the three nitpicks:
|
dc3d806 to
026833a
Compare
bde3714 to
a98ebac
Compare
23edf6d to
739c923
Compare
…migration runner Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ndation The db-foundation change dropped createElectricContainer, the electricOrigin fixture, the ContainerWithElectric* context types, and the containerWithElectricTest / containerWithElectricAndRedisTest fixtures. That Electric infra is unrelated to the run-ops db split, is being sunset on its own track, and is still consumed by apps/webapp/test/realtimeClient.test.ts (which imports containerWithElectricAndRedisTest) — so its removal here also broke that import. Restore it verbatim; the new PG17 run-ops fixtures are unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The run-ops database is migrated first-class by the @internal/run-ops-database package's own prisma migrate deploy (its schema.prisma datasource reads RUN_OPS_DATABASE_URL and it owns its own migrations dir), which the root db:migrate already sweeps via turbo. The bespoke script instead ran prisma migrate deploy from the control-plane database package against the run-ops DB, applying the full control-plane migration history rather than the run-ops subset — redundant with the native flow and wrong. Drop the script and its two script entries (root package.json, database package.json). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e schema Rework the run-ops schema comments so they read as documentation rather than working notes. Replaces the top-of-file header with prose describing the subset relationship and the three relation-handling rules, adds a short header above each model stating how it differs from its control-plane counterpart (which relations are scalar-only FKs, which are FK-free join models, which stay as real FKs), and removes the stale group-(A)/group-(B)/"drop" tags. Comments only; no model, field, type, attribute, index, or enum is changed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…17 fixture bootstrap Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
739c923 to
ea51491
Compare
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
What
The dedicated run-ops database foundation for the split: a standalone Prisma package plus the infra to run and migrate it.
internal-packages/run-ops-database— a new Prisma package (@internal/run-ops-database) whose schema mirrors the run-execution tables that will live on the dedicated DB, with its own generated client, migrations, and migration runner.prisma/schema.parity.test.ts— a parity test that guards the run-ops schema against drift from the control-plane schema for the mirrored tables.docker/Dockerfile.postgres17,docker/docker-compose.yml) so the dedicated DB is available locally under the run-ops compose profile.Why
This is the second PR in the run-ops split stack, stacked on the core primitives. It stands up the dedicated database and its tooling. There is no runtime wiring into the webapp here — the app does not read or write this DB yet; that arrives in later PRs. On its own this PR only adds a package, a docker service, and test fixtures.
Tests
Schema-parity test for the run-ops schema; hetero testcontainer fixture smoke test.
Notes
runops/pr01-core-residency). Review that one first; this diff is against it.🤖 Generated with Claude Code