Skip to content

chore: fix CONTRIBUTING.md setup steps and scope db:seed to webapp#3450

Open
ericallam wants to merge 1 commit intomainfrom
chore/contributing-and-db-seed-fixes
Open

chore: fix CONTRIBUTING.md setup steps and scope db:seed to webapp#3450
ericallam wants to merge 1 commit intomainfrom
chore/contributing-and-db-seed-fixes

Conversation

@ericallam
Copy link
Copy Markdown
Member

Summary

Two fixes that together get a fresh-machine setup working from CONTRIBUTING.md end-to-end with no manual workarounds:

CONTRIBUTING.md

  • Fix wrong path in the migration walkthrough: cd packages/databasecd internal-packages/database. The current path doesn't exist; this breaks step 2 for every contributor adding a migration.
  • Renumber duplicate 4. steps in Adding migrations and the skipped 5. in the hello-world Running section.
  • Combine three sequential pnpm run build --filter ... calls into one (Turbo parallelizes filters): pnpm run build --filter webapp --filter trigger.dev --filter @trigger.dev/sdk.
  • Add a pnpm run db:seed step after migrate. The seed creates the local user, References org, and reference projects (including hello-world with the stable proj_rrkpdguyagvsoktglnod). Removes the manual instruction to edit the externalRef column in Postgres.
  • Mention ClickHouse and the ClickHouse migrator alongside Postgres/Redis in the Docker step (they're already part of pnpm run docker, just invisible in the docs).
  • Remove the V1-era Add sample jobs section. references/job-catalog no longer exists; the hello-world flow above replaces it.

turbo.json

Scope db:seed to webapp#db:seed → webapp#build. The previous root-level entry queued build for every workspace package — including references-*, docs, kubernetes-provider, coordinator, etc. Only webapp actually has a db:seed script, so the rest of those builds were dead weight. Worse: a single broken reference (today, references-realtime-hooks-test failing under Turbopack with node:fs/promises) kills the whole seed pipeline.

After the change, turbo run db:seed --dry-run plan drops from 27 tasks to 20 — only webapp and its real transitive workspace deps. Reference projects no longer block seeding.

Test plan

  • Fresh-machine setup followed end-to-end on a wiped Postgres + ClickHouse: migrate → seed → build → webapp → CLI login → trigger dev → triggered hello-world, run completed with {"message":"Hello, world!"}.
  • turbo run db:seed --dry-run=json confirms 20 tasks, all webapp deps, no reference packages.
  • CI green on the renamed turbo task name.

- Fix wrong path 'cd packages/database' -> 'cd internal-packages/database' in
  the migration walkthrough.
- Renumber duplicate '4.' steps in Adding migrations and the skipped step in
  the hello-world Running section.
- Combine three sequential builds into one (turbo parallelizes filters):
  pnpm run build --filter webapp --filter trigger.dev --filter @trigger.dev/sdk
- Add a 'pnpm run db:seed' step after migrate. The seed creates a stable
  local user, References org, and reference projects (including hello-world
  with proj_rrkpdguyagvsoktglnod) so contributors no longer have to manually
  edit the externalRef column in Postgres.
- Mention ClickHouse and the ClickHouse migrator alongside Postgres/Redis.
- Remove the V1-era 'Add sample jobs' section — references/job-catalog no
  longer exists; the hello-world flow above replaces it.

Scope db:seed in turbo.json to 'webapp#db:seed' depending on 'webapp#build'.
The previous root-level entry queued 'build' for every workspace package
(reference projects, docs, kubernetes-provider, etc.), and a single broken
reference build (e.g. references-realtime-hooks-test failing under Turbopack)
would kill the entire seed pipeline. Scoping cuts the dry-run plan from 27
tasks to 20 — only webapp's actual transitive workspace deps.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 25, 2026

⚠️ No Changeset found

Latest commit: 5900ef6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 25, 2026

Walkthrough

Updated CONTRIBUTING.md with revised setup instructions including additional Docker services (Electric and ClickHouse), new database seeding step, simplified hello-world project initialization, adjusted build commands using multiple filters, and reorganized step numbering. Updated migration documentation paths and removed the "Add sample jobs" section. Modified turbo.json to namespace the db:seed task to webapp#db:seed and adjusted its dependency from the generic build pipeline to webapp#build.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the two main changes: fixes to CONTRIBUTING.md setup steps and scoping db:seed to webapp in turbo.json.
Description check ✅ Passed The description provides a comprehensive summary of changes, clear test plan with specific steps performed, and explains the rationale behind each modification.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/contributing-and-db-seed-fixes

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.

@ericallam ericallam marked this pull request as ready for review April 25, 2026 09:03
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CONTRIBUTING.md`:
- Around line 85-90: Update all fenced code blocks in CONTRIBUTING.md that
currently use triple backticks with no language identifier to include the shell
language tag `sh`; specifically add `sh` to the fences around the build command
block (``` pnpm run build ... ```), the seed command (``` pnpm run db:seed ```),
the migration creation block (``` pnpm run db:migrate:dev:create ```), the
migration/deploy/generate block (``` pnpm run db:migrate:deploy / pnpm run
generate ```), and the additional fences referenced around lines 189-199 so that
each opens with ```sh to satisfy markdownlint MD040.
- Line 112: Update the sentence that currently reads "log in at
http://localhost:3030 with any email to access it" to explicitly instruct using
the seeded account (local@trigger.dev) to access the References org and the
seeded hello-world project; e.g., replace that phrase with wording like "log in
at http://localhost:3030 using the seeded account local@trigger.dev (the seed
script creates the References org and hello-world project for that user)" so
first-time users won't be locked out.

In `@turbo.json`:
- Around line 38-42: Root-level NPM scripts still call the old unscoped Turbo
task names ("db:seed" and "setup") which now fail because turbo tasks were
renamed to the namespaced "webapp#db:seed"; update the root package.json scripts
that invoke "db:seed" (and the "setup" script that chains it) to call
"webapp#db:seed" instead so Turbo finds the namespaced task (ensure any script
that runs "pnpm run db:seed" or "turbo run db:seed" is updated to
"webapp#db:seed").
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 2daa486c-32e2-4ad7-a648-7dea6840733e

📥 Commits

Reviewing files that changed from the base of the PR and between 5693b62 and 5900ef6.

📒 Files selected for processing (2)
  • CONTRIBUTING.md
  • turbo.json
📜 Review details
⏰ 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). (30)
  • GitHub Check: audit
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
  • GitHub Check: units / e2e-webapp / 🧪 E2E Tests: Webapp
  • GitHub Check: typecheck / typecheck
  • GitHub Check: sdk-compat / Node.js 22.12 (ubuntu-latest)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
  • GitHub Check: sdk-compat / Node.js 20.20 (ubuntu-latest)
  • GitHub Check: sdk-compat / Deno Runtime
  • GitHub Check: sdk-compat / Cloudflare Workers
  • GitHub Check: sdk-compat / Bun Runtime
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,ts,jsx,tsx,json,md,yaml,yml}

📄 CodeRabbit inference engine (AGENTS.md)

Format code using Prettier before committing

Files:

  • turbo.json
  • CONTRIBUTING.md
🧠 Learnings (17)
📓 Common learnings
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3368
File: internal-packages/database/prisma/schema.prisma:666-666
Timestamp: 2026-04-16T14:21:18.496Z
Learning: In `triggerdotdev/trigger.dev`, the `BackgroundWorkerTask` covering index on `(runtimeEnvironmentId, slug, triggerSource)` lives in `internal-packages/database/prisma/migrations/20260413000000_add_bwt_covering_index/migration.sql` as a `CREATE INDEX CONCURRENTLY IF NOT EXISTS`, intentionally in its own migration file separate from the `TaskIdentifier` table migration. Do not flag this index as missing from the schema migrations in future reviews.
📚 Learning: 2026-04-15T15:39:06.868Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-15T15:39:06.868Z
Learning: When modifying any public package (`packages/*` or `integrations/*`), add a changeset using `pnpm run changeset:add`.

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Run `npx trigger.devlatest dev` to start the Trigger.dev development server

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Run `npx trigger.devlatest init` to initialize a new Trigger.dev project

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2026-04-16T14:19:16.330Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: apps/webapp/CLAUDE.md:0-0
Timestamp: 2026-04-16T14:19:16.330Z
Learning: Never run `pnpm run build --filter webapp` to verify changes. Use typecheck from the repo root instead (`pnpm run typecheck --filter webapp`). Building proves almost nothing about correctness; only run typecheck after major changes (new files, significant refactors, schema changes)

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `task()` from `trigger.dev/sdk` for basic task definitions with `id` and `run` properties

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `task.trigger()` to trigger a single run of a task from inside another task

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/src/build/**/* : Bundle worker code using the build system in `src/build/` based on configuration from `trigger.config.ts`

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: The SDK at packages/trigger-sdk is an isomorphic TypeScript SDK

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2026-03-02T12:43:48.124Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/trigger-sdk/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:48.124Z
Learning: Test new features with the `references/hello-world` reference project

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/src/commands/init.ts : Implement `init.ts` command in `src/commands/` for project initialization

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2026-03-02T12:43:37.906Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/core/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:37.906Z
Learning: Exercise caution with changes to trigger.dev/core as they affect both the customer-facing SDK and server-side webapp - breaking changes can impact deployed user tasks and the platform simultaneously

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `schemaTask()` from `trigger.dev/sdk` with a Zod schema for payload validation

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2026-03-02T12:43:17.177Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: internal-packages/database/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:17.177Z
Learning: Edit Prisma schema at `prisma/schema.prisma` and generate migrations using `pnpm run db:migrate:dev:create --name "descriptive_name"` from the `internal-packages/database` directory

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/.claude/skills/trigger-dev-tasks/**/* : Update `.claude/skills/trigger-dev-tasks/` in parallel with `rules/` when SDK features change

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to **/*.{test,spec}.{ts,tsx} : Use vitest for all tests in the Trigger.dev repository

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2026-04-16T14:19:16.330Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: apps/webapp/CLAUDE.md:0-0
Timestamp: 2026-04-16T14:19:16.330Z
Learning: Applies to apps/webapp/app/v3/**Worker.server.ts : Do NOT add new jobs using zodworker/graphile-worker (legacy). Background job workers use `trigger.dev/redis-worker` via files like `app/v3/commonWorker.server.ts`, `app/v3/alertsWorker.server.ts`, `app/v3/batchTriggerWorker.server.ts`

Applied to files:

  • CONTRIBUTING.md
🪛 LanguageTool
CONTRIBUTING.md

[grammar] ~84-~84: Ensure spelling is correct
Context: ...npm run db:migrate 10. Build the webapp, CLI, and SDK pnpm run buil...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~112-~112: Ensure spelling is correct
Context: ...p First, make sure you are running the webapp according to the instructions above. Th...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~170-~170: This phrase is redundant. Consider using “inside”.
Context: ...ickup changes. Any changes to the files inside of the hello-world/src/trigger dir will ...

(OUTSIDE_OF)


[style] ~176-~176: Consider using a less common alternative to make your writing sound more unique and professional.
Context: ...ny of them accept an empty payload. 8. Feel free to add additional files in `hello-world/sr...

(FEEL_FREE_TO_STYLE_ME)


[grammar] ~205-~205: Ensure spelling is correct
Context: ...to restart the TypeScript server in the webapp to get updated type inference. Open a T...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 markdownlint-cli2 (0.22.1)
CONTRIBUTING.md

[warning] 85-85: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 89-89: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 189-189: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 197-197: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

Comment thread CONTRIBUTING.md
Comment thread CONTRIBUTING.md
Comment thread turbo.json
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