Skip to content

feat: add node 22 and bun runtime support with version display #2254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jul 10, 2025

Conversation

nicktrn
Copy link
Collaborator

@nicktrn nicktrn commented Jul 9, 2025

🚀 New Features

  • Runtime Detection & Display: Added runtime and version tracking in deployments with new UI components to show runtime icons and versions in deployment lists and details
  • Updated Base Images: Upgraded to Node.js 22.16.0 and Bun 1.2.18 with proper image references
  • Database Schema: Added runtime and runtimeVersion columns to WorkerDeployment and BackgroundWorker table
  • UI Components: Created RuntimeIcon component with Node.js and Bun logos, plus runtime utility functions for parsing and formatting

🔧 Improvements

  • Build Improvements: Added local build indicators and io_uring environment variable configuration
  • Bug Fixes: Fixed fallback runtime handling and prevented duplicate warnings in the CLI

📋 Technical Details

  • Added new database migrations for runtime fields
  • Created reusable RuntimeIcon component with tooltips
  • Updated deployment presenters to include runtime information
  • Enhanced CLI deploy command with better build/deploy status messages
  • Added runtime version detection and display throughout the UI

📸 Screenshots

Deployments list

image

Deployment details

image

Run details

image
image

Copy link

changeset-bot bot commented Jul 9, 2025

🦋 Changeset detected

Latest commit: d2ffd97

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

Copy link
Contributor

coderabbitai bot commented Jul 9, 2025

Walkthrough

This change introduces comprehensive support for capturing, storing, and displaying runtime environment information (such as "Bun" or "Node.js" and their versions) across the deployment and background worker lifecycle. Database schema migrations add runtime and runtimeVersion fields to relevant tables. Prisma models and queries are updated to handle these new fields. The CLI and build processes are modified to detect and propagate runtime details during deployment and worker creation. New React components (BunLogoIcon, NodejsLogoIcon, and RuntimeIcon) and utility functions are added to render runtime icons and labels in the web application UI, with updates to various pages to display this information. Some legacy logic related to retry indexing is removed, and environment handling is extended to support the UV_USE_IO_URING variable. Additionally, improvements include refined runtime path resolution and enhanced configuration loading options.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8b44cae and d2ffd97.

📒 Files selected for processing (1)
  • apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts
⏰ 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). (25)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 10)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (10, 10)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (9, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 10)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: Analyze (javascript-typescript)
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
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: 1

🧹 Nitpick comments (1)
apps/webapp/app/components/RuntimeIcon.tsx (1)

51-55: Consider simplifying the icon type check.

The condition typeof icon === "object" && "type" in icon appears to be checking if the icon is a React element, but this could be simplified or made more explicit.

Consider using React.isValidElement(icon) for a more explicit check:

-  if (typeof icon === "object" && "type" in icon) {
+  if (React.isValidElement(icon)) {

Or, alternatively, restructure the logic to avoid the type check entirely by ensuring getIcon always returns a valid React element or null.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f456f68 and 222908b.

⛔ Files ignored due to path filters (2)
  • references/bun-catalog/src/trigger/bun.ts is excluded by !references/**
  • references/bun-catalog/trigger.config.ts is excluded by !references/**
📒 Files selected for processing (31)
  • apps/webapp/app/assets/icons/BunLogoIcon.tsx (1 hunks)
  • apps/webapp/app/assets/icons/NodejsLogoIcon.tsx (1 hunks)
  • apps/webapp/app/components/RuntimeIcon.tsx (1 hunks)
  • apps/webapp/app/presenters/v3/DeploymentListPresenter.server.ts (3 hunks)
  • apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts (2 hunks)
  • apps/webapp/app/presenters/v3/SpanPresenter.server.ts (2 hunks)
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx (2 hunks)
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx (5 hunks)
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx (2 hunks)
  • apps/webapp/app/utils/runtime.ts (1 hunks)
  • apps/webapp/app/v3/deploymentStatus.ts (0 hunks)
  • apps/webapp/app/v3/services/createBackgroundWorker.server.ts (1 hunks)
  • apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts (1 hunks)
  • apps/webapp/app/v3/services/initializeDeployment.server.ts (1 hunks)
  • internal-packages/database/prisma/migrations/20250709115807_add_worker_deployment_runtime/migration.sql (1 hunks)
  • internal-packages/database/prisma/migrations/20250709123917_add_worker_deployment_runtime_version/migration.sql (1 hunks)
  • internal-packages/database/prisma/migrations/20250709191244_add_runtime_and_runtime_version_to_background_worker/migration.sql (1 hunks)
  • internal-packages/database/prisma/schema.prisma (3 hunks)
  • packages/cli-v3/src/commands/deploy.ts (6 hunks)
  • packages/cli-v3/src/commands/whoami.ts (1 hunks)
  • packages/cli-v3/src/config.ts (2 hunks)
  • packages/cli-v3/src/deploy/buildImage.ts (3 hunks)
  • packages/cli-v3/src/dev/devSupervisor.ts (1 hunks)
  • packages/cli-v3/src/entryPoints/dev-index-worker.ts (2 hunks)
  • packages/cli-v3/src/entryPoints/managed-index-controller.ts (1 hunks)
  • packages/cli-v3/src/entryPoints/managed-index-worker.ts (2 hunks)
  • packages/cli-v3/src/entryPoints/managed/env.ts (3 hunks)
  • packages/core/src/v3/build/runtime.ts (3 hunks)
  • packages/core/src/v3/schemas/api.ts (1 hunks)
  • packages/core/src/v3/schemas/build.ts (1 hunks)
  • packages/core/src/v3/schemas/resources.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • apps/webapp/app/v3/deploymentStatus.ts
🧰 Additional context used
📓 Path-based instructions (5)
`**/*.{ts,tsx}`: Always prefer using isomorphic code like fetch, ReadableStream,...

**/*.{ts,tsx}: Always prefer using isomorphic code like fetch, ReadableStream, etc. instead of Node.js specific code
For TypeScript, we usually use types over interfaces
Avoid enums
Use strict mode
No default exports, use function declarations

📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md)

List of files the instruction was applied to:

  • packages/cli-v3/src/entryPoints/managed-index-controller.ts
  • packages/core/src/v3/schemas/resources.ts
  • packages/core/src/v3/schemas/build.ts
  • packages/cli-v3/src/commands/whoami.ts
  • packages/cli-v3/src/entryPoints/managed-index-worker.ts
  • apps/webapp/app/v3/services/createBackgroundWorker.server.ts
  • packages/core/src/v3/schemas/api.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx
  • apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts
  • packages/cli-v3/src/entryPoints/dev-index-worker.ts
  • packages/cli-v3/src/dev/devSupervisor.ts
  • packages/cli-v3/src/commands/deploy.ts
  • packages/cli-v3/src/deploy/buildImage.ts
  • apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx
  • apps/webapp/app/presenters/v3/DeploymentListPresenter.server.ts
  • apps/webapp/app/v3/services/initializeDeployment.server.ts
  • apps/webapp/app/assets/icons/NodejsLogoIcon.tsx
  • apps/webapp/app/assets/icons/BunLogoIcon.tsx
  • apps/webapp/app/presenters/v3/SpanPresenter.server.ts
  • packages/core/src/v3/build/runtime.ts
  • packages/cli-v3/src/entryPoints/managed/env.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx
  • apps/webapp/app/components/RuntimeIcon.tsx
  • packages/cli-v3/src/config.ts
  • apps/webapp/app/utils/runtime.ts
`{packages/core,apps/webapp}/**/*.{ts,tsx}`: We use zod a lot in packages/core and in the webapp

{packages/core,apps/webapp}/**/*.{ts,tsx}: We use zod a lot in packages/core and in the webapp

📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md)

List of files the instruction was applied to:

  • packages/core/src/v3/schemas/resources.ts
  • packages/core/src/v3/schemas/build.ts
  • apps/webapp/app/v3/services/createBackgroundWorker.server.ts
  • packages/core/src/v3/schemas/api.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx
  • apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts
  • apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx
  • apps/webapp/app/presenters/v3/DeploymentListPresenter.server.ts
  • apps/webapp/app/v3/services/initializeDeployment.server.ts
  • apps/webapp/app/assets/icons/NodejsLogoIcon.tsx
  • apps/webapp/app/assets/icons/BunLogoIcon.tsx
  • apps/webapp/app/presenters/v3/SpanPresenter.server.ts
  • packages/core/src/v3/build/runtime.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx
  • apps/webapp/app/components/RuntimeIcon.tsx
  • apps/webapp/app/utils/runtime.ts
`apps/webapp/**/*.ts`: In the webapp, all environment variables must be accessed through the `env` export of `env.server.ts`, instead of directly accessing `process.env`.

apps/webapp/**/*.ts: In the webapp, all environment variables must be accessed through the env export of env.server.ts, instead of directly accessing process.env.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/webapp.mdc)

List of files the instruction was applied to:

  • apps/webapp/app/v3/services/createBackgroundWorker.server.ts
  • apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts
  • apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts
  • apps/webapp/app/presenters/v3/DeploymentListPresenter.server.ts
  • apps/webapp/app/v3/services/initializeDeployment.server.ts
  • apps/webapp/app/presenters/v3/SpanPresenter.server.ts
  • apps/webapp/app/utils/runtime.ts
`apps/webapp/**/*.{ts,tsx}`: When importing from `@trigger.dev/core` in the weba...

apps/webapp/**/*.{ts,tsx}: When importing from @trigger.dev/core in the webapp, never import from the root @trigger.dev/core path; always use one of the subpath exports as defined in the package's package.json.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/webapp.mdc)

List of files the instruction was applied to:

  • apps/webapp/app/v3/services/createBackgroundWorker.server.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx
  • apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts
  • apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx
  • apps/webapp/app/presenters/v3/DeploymentListPresenter.server.ts
  • apps/webapp/app/v3/services/initializeDeployment.server.ts
  • apps/webapp/app/assets/icons/NodejsLogoIcon.tsx
  • apps/webapp/app/assets/icons/BunLogoIcon.tsx
  • apps/webapp/app/presenters/v3/SpanPresenter.server.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx
  • apps/webapp/app/components/RuntimeIcon.tsx
  • apps/webapp/app/utils/runtime.ts
`**/*.tsx`: When using React hooks for realtime updates, use `@trigger.dev/react-hooks` and provide a Public Access Token via context or props.

**/*.tsx: When using React hooks for realtime updates, use @trigger.dev/react-hooks and provide a Public Access Token via context or props.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/writing-tasks.mdc)

List of files the instruction was applied to:

  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx
  • apps/webapp/app/assets/icons/NodejsLogoIcon.tsx
  • apps/webapp/app/assets/icons/BunLogoIcon.tsx
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx
  • apps/webapp/app/components/RuntimeIcon.tsx
🧠 Learnings (20)
📓 Common learnings
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T13:21:33.994Z
Learning: Applies to internal-packages/database/**/*.{ts,tsx} : We use prisma in internal-packages/database for our database interactions using PostgreSQL
internal-packages/database/prisma/migrations/20250709123917_add_worker_deployment_runtime_version/migration.sql (2)
Learnt from: ericallam
PR: triggerdotdev/trigger.dev#2086
File: internal-packages/database/prisma/migrations/20250511145836_runtime_environment_add_is_branchable_environment/migration.sql:1-3
Timestamp: 2025-05-27T19:30:34.004Z
Learning: In modern PostgreSQL versions (11+), adding a column with a constant default value (like DEFAULT false, DEFAULT 0, DEFAULT 'text') does NOT require a table rewrite. PostgreSQL stores the default value in the catalog and applies it virtually when reading rows. Only non-constant defaults or more complex scenarios require table rewrites. Avoid suggesting multi-step migrations for simple constant defaults.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T13:21:33.994Z
Learning: Applies to internal-packages/database/**/*.{ts,tsx} : We use prisma in internal-packages/database for our database interactions using PostgreSQL
internal-packages/database/prisma/migrations/20250709191244_add_runtime_and_runtime_version_to_background_worker/migration.sql (1)
Learnt from: ericallam
PR: triggerdotdev/trigger.dev#2086
File: internal-packages/database/prisma/migrations/20250511145836_runtime_environment_add_is_branchable_environment/migration.sql:1-3
Timestamp: 2025-05-27T19:30:34.004Z
Learning: In modern PostgreSQL versions (11+), adding a column with a constant default value (like DEFAULT false, DEFAULT 0, DEFAULT 'text') does NOT require a table rewrite. PostgreSQL stores the default value in the catalog and applies it virtually when reading rows. Only non-constant defaults or more complex scenarios require table rewrites. Avoid suggesting multi-step migrations for simple constant defaults.
packages/cli-v3/src/entryPoints/managed-index-controller.ts (1)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `metadata` API from `@trigger.dev/sdk/v3` to attach, update, and access structured metadata within task runs.
packages/core/src/v3/schemas/resources.ts (1)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `metadata` API from `@trigger.dev/sdk/v3` to attach, update, and access structured metadata within task runs.
packages/cli-v3/src/commands/whoami.ts (4)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to trigger.config.ts : The `trigger.config.ts` file must use `defineConfig` from `@trigger.dev/sdk/v3` to configure project settings, directories, retries, telemetry, runtime, machine settings, log level, max duration, and build options.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to trigger.config.ts : Global lifecycle hooks for tasks can be defined in `trigger.config.ts` to apply to all tasks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to trigger.config.ts : Build extensions for Trigger.dev must be configured in the `build` property of `trigger.config.ts` using provided or custom extensions.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using retry, queue, machine, or maxDuration options, configure them within the `task` function in Trigger.dev task files.
packages/cli-v3/src/entryPoints/managed-index-worker.ts (12)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `runs` and `tasks` APIs from `@trigger.dev/sdk/v3` to subscribe to run updates and implement realtime features.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `metadata` API from `@trigger.dev/sdk/v3` to attach, update, and access structured metadata within task runs.
Learnt from: nicktrn
PR: triggerdotdev/trigger.dev#1418
File: packages/core/src/v3/errors.ts:364-371
Timestamp: 2024-10-18T15:41:52.352Z
Learning: In `packages/core/src/v3/errors.ts`, within the `taskRunErrorEnhancer` function, `error.message` is always defined, so it's safe to directly call `error.message.includes("SIGTERM")` without additional checks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : ALWAYS generate Trigger.dev tasks using the `task` function from `@trigger.dev/sdk/v3` and NEVER use the deprecated `client.defineJob` pattern.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Before generating any code for Trigger.dev tasks, verify that you are importing from `@trigger.dev/sdk/v3`, exporting every task, and not generating any deprecated code patterns.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST use `@trigger.dev/sdk/v3` when writing Trigger.dev tasks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to trigger.config.ts : The `trigger.config.ts` file must use `defineConfig` from `@trigger.dev/sdk/v3` to configure project settings, directories, retries, telemetry, runtime, machine settings, log level, max duration, and build options.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Scheduled tasks must use `schedules.task` from `@trigger.dev/sdk/v3` and define a `cron` property for declarative schedules.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : The `run` function must contain the main logic for each Trigger.dev task.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/webapp.mdc:0-0
Timestamp: 2025-06-30T13:21:59.438Z
Learning: Applies to apps/webapp/**/*.{ts,tsx} : When importing from `@trigger.dev/core` in the webapp, never import from the root `@trigger.dev/core` path; always use one of the subpath exports as defined in the package's package.json.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from backend code, use `tasks.trigger`, `tasks.batchTrigger`, or `tasks.triggerAndPoll` from `@trigger.dev/sdk/v3` and set the `TRIGGER_SECRET_KEY` environment variable.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST `export` every task, including subtasks, in Trigger.dev task files.
apps/webapp/app/v3/services/createBackgroundWorker.server.ts (1)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `metadata` API from `@trigger.dev/sdk/v3` to attach, update, and access structured metadata within task runs.
internal-packages/database/prisma/migrations/20250709115807_add_worker_deployment_runtime/migration.sql (2)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T13:21:33.994Z
Learning: Applies to internal-packages/database/**/*.{ts,tsx} : We use prisma in internal-packages/database for our database interactions using PostgreSQL
Learnt from: ericallam
PR: triggerdotdev/trigger.dev#2086
File: internal-packages/database/prisma/migrations/20250511145836_runtime_environment_add_is_branchable_environment/migration.sql:1-3
Timestamp: 2025-05-27T19:30:34.004Z
Learning: In modern PostgreSQL versions (11+), adding a column with a constant default value (like DEFAULT false, DEFAULT 0, DEFAULT 'text') does NOT require a table rewrite. PostgreSQL stores the default value in the catalog and applies it virtually when reading rows. Only non-constant defaults or more complex scenarios require table rewrites. Avoid suggesting multi-step migrations for simple constant defaults.
packages/cli-v3/src/entryPoints/dev-index-worker.ts (12)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `runs` and `tasks` APIs from `@trigger.dev/sdk/v3` to subscribe to run updates and implement realtime features.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : ALWAYS generate Trigger.dev tasks using the `task` function from `@trigger.dev/sdk/v3` and NEVER use the deprecated `client.defineJob` pattern.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST use `@trigger.dev/sdk/v3` when writing Trigger.dev tasks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Before generating any code for Trigger.dev tasks, verify that you are importing from `@trigger.dev/sdk/v3`, exporting every task, and not generating any deprecated code patterns.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `metadata` API from `@trigger.dev/sdk/v3` to attach, update, and access structured metadata within task runs.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to trigger.config.ts : The `trigger.config.ts` file must use `defineConfig` from `@trigger.dev/sdk/v3` to configure project settings, directories, retries, telemetry, runtime, machine settings, log level, max duration, and build options.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : The `run` function must contain the main logic for each Trigger.dev task.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/webapp.mdc:0-0
Timestamp: 2025-06-30T13:21:59.438Z
Learning: Applies to apps/webapp/**/*.{ts,tsx} : When importing from `@trigger.dev/core` in the webapp, never import from the root `@trigger.dev/core` path; always use one of the subpath exports as defined in the package's package.json.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Scheduled tasks must use `schedules.task` from `@trigger.dev/sdk/v3` and define a `cron` property for declarative schedules.
Learnt from: nicktrn
PR: triggerdotdev/trigger.dev#1418
File: packages/core/src/v3/errors.ts:364-371
Timestamp: 2024-10-18T15:41:52.352Z
Learning: In `packages/core/src/v3/errors.ts`, within the `taskRunErrorEnhancer` function, `error.message` is always defined, so it's safe to directly call `error.message.includes("SIGTERM")` without additional checks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from backend code, use `tasks.trigger`, `tasks.batchTrigger`, or `tasks.triggerAndPoll` from `@trigger.dev/sdk/v3` and set the `TRIGGER_SECRET_KEY` environment variable.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST `export` every task, including subtasks, in Trigger.dev task files.
packages/cli-v3/src/dev/devSupervisor.ts (1)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `metadata` API from `@trigger.dev/sdk/v3` to attach, update, and access structured metadata within task runs.
packages/cli-v3/src/commands/deploy.ts (1)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to trigger.config.ts : Build extensions for Trigger.dev must be configured in the `build` property of `trigger.config.ts` using provided or custom extensions.
packages/cli-v3/src/deploy/buildImage.ts (2)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from backend code, use `tasks.trigger`, `tasks.batchTrigger`, or `tasks.triggerAndPoll` from `@trigger.dev/sdk/v3` and set the `TRIGGER_SECRET_KEY` environment variable.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST use `@trigger.dev/sdk/v3` when writing Trigger.dev tasks.
apps/webapp/app/presenters/v3/SpanPresenter.server.ts (2)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `runs` and `tasks` APIs from `@trigger.dev/sdk/v3` to subscribe to run updates and implement realtime features.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T13:21:33.994Z
Learning: Applies to internal-packages/database/**/*.{ts,tsx} : We use prisma in internal-packages/database for our database interactions using PostgreSQL
packages/cli-v3/src/entryPoints/managed/env.ts (4)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/webapp.mdc:0-0
Timestamp: 2025-06-30T13:21:59.438Z
Learning: Applies to apps/webapp/**/*.ts : In the webapp, all environment variables must be accessed through the `env` export of `env.server.ts`, instead of directly accessing `process.env`.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to trigger.config.ts : The `trigger.config.ts` file must use `defineConfig` from `@trigger.dev/sdk/v3` to configure project settings, directories, retries, telemetry, runtime, machine settings, log level, max duration, and build options.
Learnt from: nicktrn
PR: triggerdotdev/trigger.dev#1407
File: apps/kubernetes-provider/src/index.ts:37-39
Timestamp: 2024-10-16T12:24:37.279Z
Learning: In Node.js, when assigning default values to environment variables using the `||` operator (e.g., `const VAR = process.env.VAR || 'default'`), empty strings are treated as falsy values, so the default value will be used without additional checks.
Learnt from: nicktrn
PR: triggerdotdev/trigger.dev#2195
File: hosting/k8s/helm/values.yaml:22-51
Timestamp: 2025-06-25T13:20:17.174Z
Learning: In the Trigger.dev Helm chart values.yaml, the maintainer prefers to use explicit comprehensive warnings for security-sensitive default values rather than implementing secure-by-default behavior that would fail installation. The project uses deterministic default secrets with clear "TESTING ONLY" warnings and instructions for production deployment.
internal-packages/database/prisma/schema.prisma (5)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T13:21:33.994Z
Learning: Applies to internal-packages/database/**/*.{ts,tsx} : We use prisma in internal-packages/database for our database interactions using PostgreSQL
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Schema tasks must use `schemaTask` from `@trigger.dev/sdk/v3` and validate payloads using a schema (e.g., Zod).
Learnt from: matt-aitken
PR: triggerdotdev/trigger.dev#2035
File: apps/webapp/app/v3/services/finalizeTaskRun.server.ts:99-103
Timestamp: 2025-05-12T17:23:05.574Z
Learning: Prisma ignores undefined values in update operations. When a field is set to undefined in a Prisma update operation's data object, Prisma will omit that field from the update rather than trying to set it to null or another value. This means there's no need to conditionally build update objects to exclude undefined values.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using retry, queue, machine, or maxDuration options, configure them within the `task` function in Trigger.dev task files.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `metadata` API from `@trigger.dev/sdk/v3` to attach, update, and access structured metadata within task runs.
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx (1)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `metadata` API from `@trigger.dev/sdk/v3` to attach, update, and access structured metadata within task runs.
apps/webapp/app/components/RuntimeIcon.tsx (2)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/*.tsx : When using React hooks for realtime updates, use `@trigger.dev/react-hooks` and provide a Public Access Token via context or props.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `runs` and `tasks` APIs from `@trigger.dev/sdk/v3` to subscribe to run updates and implement realtime features.
packages/cli-v3/src/config.ts (4)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to trigger.config.ts : The `trigger.config.ts` file must use `defineConfig` from `@trigger.dev/sdk/v3` to configure project settings, directories, retries, telemetry, runtime, machine settings, log level, max duration, and build options.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to trigger.config.ts : Build extensions for Trigger.dev must be configured in the `build` property of `trigger.config.ts` using provided or custom extensions.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to trigger.config.ts : Global lifecycle hooks for tasks can be defined in `trigger.config.ts` to apply to all tasks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using retry, queue, machine, or maxDuration options, configure them within the `task` function in Trigger.dev task files.
apps/webapp/app/utils/runtime.ts (1)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/webapp.mdc:0-0
Timestamp: 2025-06-30T13:21:59.438Z
Learning: Applies to apps/webapp/**/*.ts : In the webapp, all environment variables must be accessed through the `env` export of `env.server.ts`, instead of directly accessing `process.env`.
🧬 Code Graph Analysis (3)
packages/cli-v3/src/entryPoints/managed-index-worker.ts (1)
packages/core/src/v3/build/runtime.ts (1)
  • detectRuntimeVersion (89-103)
packages/cli-v3/src/entryPoints/dev-index-worker.ts (1)
packages/core/src/v3/build/runtime.ts (1)
  • detectRuntimeVersion (89-103)
apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx (1)
apps/webapp/app/components/RuntimeIcon.tsx (1)
  • RuntimeIcon (24-58)
⏰ 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). (25)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 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 (1, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (9, 10)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (10, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 10)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 10)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (57)
packages/cli-v3/src/config.ts (3)

26-31: Well-designed optional parameter addition.

The warn boolean option is properly typed as optional and follows TypeScript best practices. This allows callers to control warning behavior during configuration validation.


33-38: Good default parameter implementation.

The warn = true default maintains backward compatibility while enabling the new functionality. The parameter positioning and naming are clear and consistent.


46-46: Correct parameter propagation.

The warn parameter is properly passed through to resolveConfig, completing the implementation chain from the public API to the internal validation logic.

packages/cli-v3/src/commands/whoami.ts (1)

86-92: Appropriate use of warning suppression.

Setting warn: false for the whoami command is the correct approach. This command focuses on displaying account details and shouldn't show configuration warnings to users, which could be confusing or irrelevant in this context.

packages/core/src/v3/build/runtime.ts (2)

5-5: Good improvement for cross-platform compatibility.

The change from hardcoded path to using homedir() makes the Bun executable path more robust across different systems and user configurations.

Also applies to: 35-35


89-103: Well-implemented runtime version detection.

The function correctly prioritizes Bun detection over Node.js and includes proper error handling. The logic is clear and the fallback behavior is appropriate.

internal-packages/database/prisma/migrations/20250709123917_add_worker_deployment_runtime_version/migration.sql (1)

1-2: Clean and efficient migration.

The migration correctly adds the runtimeVersion column as nullable TEXT, which is appropriate for storing runtime version strings. This approach is efficient in modern PostgreSQL versions.

internal-packages/database/prisma/migrations/20250709191244_add_runtime_and_runtime_version_to_background_worker/migration.sql (1)

1-3: Consistent and efficient migration approach.

The migration properly adds both runtime fields to the BackgroundWorker table in a single operation, which is more efficient than separate migrations. The nullable TEXT columns are appropriate for storing runtime metadata.

packages/cli-v3/src/entryPoints/managed-index-controller.ts (1)

107-108: Proper runtime metadata propagation.

The addition of runtime and runtimeVersion fields to the metadata object correctly propagates this information during background worker creation, aligning with the broader runtime tracking feature.

packages/core/src/v3/schemas/api.ts (1)

351-351: Appropriate schema extension.

The optional runtime field addition follows the existing zod schema patterns and properly supports the runtime tracking feature without breaking existing API compatibility.

apps/webapp/app/v3/services/createBackgroundWorker.server.ts (1)

84-85: LGTM! Runtime metadata addition follows established patterns.

The addition of runtime and runtimeVersion fields to the background worker creation data is consistent with the existing pattern of extracting metadata from the request body. This aligns well with the broader runtime tracking initiative across the codebase.

packages/core/src/v3/schemas/build.ts (1)

93-93: LGTM! Schema extension is well-structured.

The addition of the optional runtimeVersion field to the WorkerManifest schema is properly typed and positioned logically next to the related runtime field. The optional nature ensures backward compatibility.

internal-packages/database/prisma/migrations/20250709115807_add_worker_deployment_runtime/migration.sql (1)

1-2: LGTM! Database migration is properly structured.

The migration correctly adds a nullable runtime TEXT column to the WorkerDeployment table. The simple ALTER TABLE approach is appropriate and won't require a table rewrite in modern PostgreSQL versions.

packages/cli-v3/src/dev/devSupervisor.ts (1)

218-219: LGTM! Runtime metadata extraction follows established conventions.

The addition of runtime and runtimeVersion to the background worker metadata follows the same pattern as other manifest fields. The extraction from backgroundWorker.manifest is consistent with the existing code structure.

packages/core/src/v3/schemas/resources.ts (1)

36-37: LGTM! Schema extension is properly designed.

The addition of optional runtime and runtimeVersion fields to the BackgroundWorkerMetadata schema is well-structured. Both fields are appropriately typed as optional strings, ensuring backward compatibility while extending the metadata capabilities.

packages/cli-v3/src/entryPoints/managed-index-worker.ts (2)

20-20: LGTM - Import addition is clean and follows conventions.

The import of detectRuntimeVersion is properly structured and follows the established pattern of importing from core modules.


158-158: LGTM - Runtime version detection is correctly implemented.

The call to detectRuntimeVersion() appropriately adds runtime version information to the manifest. The function handles errors gracefully by returning undefined when detection fails.

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx (2)

6-6: LGTM - Component import follows established patterns.

The import of RuntimeIcon is properly structured and follows the webapp's component import conventions.


173-182: LGTM - Runtime display is well-integrated into the UI.

The new Runtime property item is appropriately positioned in the deployment details and follows the established pattern for property items. The RuntimeIcon component receives the correct props and the withLabel prop enhances the display.

packages/cli-v3/src/deploy/buildImage.ts (2)

682-682: LGTM - Environment variable addition is appropriate.

The addition of UV_USE_IO_URING=0 is correctly placed in the final stage environment variables. This setting likely disables io_uring usage for compatibility in containerized environments.


795-795: LGTM - Consistent environment variable addition.

The addition of UV_USE_IO_URING=0 maintains consistency with the Bun containerfile and is correctly placed in the final stage environment variables.

packages/cli-v3/src/entryPoints/dev-index-worker.ts (2)

20-20: LGTM - Import is consistent and well-structured.

The import of detectRuntimeVersion is consistent with the managed-index-worker.ts file and follows the established pattern for core module imports.


158-158: LGTM - Runtime version detection is consistently implemented.

The usage of detectRuntimeVersion() is consistent with the managed-index-worker.ts file, ensuring runtime version detection works consistently across both development and managed environments.

apps/webapp/app/v3/services/initializeDeployment.server.ts (1)

127-127: LGTM - Runtime field addition follows established patterns.

The addition of runtime: payload.runtime ?? undefined follows the established pattern for optional fields in deployment creation and is correctly implemented.

apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts (1)

163-164: LGTM! Runtime version update correctly implemented.

The change correctly adds the runtimeVersion field to the deployment update, and the comment clearly explains why only the version needs to be updated here. This aligns with the broader runtime metadata enhancement.

apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts (2)

75-76: LGTM! Runtime fields correctly added to database query.

The runtime and runtimeVersion fields are properly added to the select clause to fetch their values from the database.


162-163: LGTM! Runtime fields correctly included in response object.

The runtime and runtimeVersion fields are properly included in the returned deployment object, maintaining consistency with the database query.

apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx (2)

39-39: LGTM! RuntimeIcon import correctly added.

The RuntimeIcon component is properly imported from the correct location.


579-588: LGTM! Runtime property correctly added to the detail table.

The Runtime property is properly implemented using the RuntimeIcon component with the withLabel prop, displaying both the runtime and runtimeVersion from the run object. The positioning in the property table is logical and follows the established pattern.

packages/cli-v3/src/commands/deploy.ts (7)

314-314: LGTM! Runtime field correctly added to deployment initialization.

The runtime field from the build manifest is properly included in the deployment initialization, maintaining consistency with the broader runtime metadata enhancement.


393-394: LGTM! Local build indicators correctly implemented.

The buildSuffix and deploySuffix variables are properly defined to indicate local builds, improving user experience by clearly distinguishing between local and remote builds.


400-403: LGTM! Build suffix consistently applied to spinner messages.

The buildSuffix is properly applied to both spinner start messages, maintaining consistency in user feedback.


433-438: LGTM! Build suffix consistently applied to spinner update messages.

The buildSuffix is properly applied to spinner update messages during the build process, maintaining consistency with other messaging.


513-520: LGTM! Deploy suffix consistently applied to deployment messages.

The deploySuffix is properly applied to deployment phase messages, maintaining consistency with the build phase messaging.


535-540: LGTM! Deploy suffix consistently applied to deployment update messages.

The deploySuffix is properly applied to deployment update messages during the finalization process.


557-560: LGTM! Deploy suffix consistently applied to success messages.

The deploySuffix is properly applied to both CI and spinner success messages, completing the consistent messaging pattern.

apps/webapp/app/assets/icons/NodejsLogoIcon.tsx (1)

1-15: LGTM! Node.js logo icon correctly implemented.

The NodejsLogoIcon component is well-implemented with:

  • Proper TypeScript typing for the className prop
  • Clean SVG structure with appropriate viewBox and namespace
  • Correct Node.js brand color (#5FA04E)
  • Well-formed SVG paths for the logo
  • Consistent pattern with other icon components
apps/webapp/app/presenters/v3/SpanPresenter.server.ts (1)

145-146: LGTM! Runtime metadata integration is consistent.

The addition of runtime and runtimeVersion fields follows the established pattern for version metadata in the span presenter. The changes are properly integrated into both the database query and the returned object structure.

Also applies to: 331-332

apps/webapp/app/presenters/v3/DeploymentListPresenter.server.ts (1)

100-101: LGTM! Runtime metadata properly integrated into deployment list.

The runtime fields are consistently added across the TypeScript interface, SQL query, and returned object mapping. The nullable typing appropriately handles optional runtime information.

Also applies to: 119-120, 155-156

apps/webapp/app/assets/icons/BunLogoIcon.tsx (1)

1-94: LGTM! Well-implemented icon component.

The BunLogoIcon component follows React best practices with proper TypeScript typing, semantic SVG structure, and adherence to the coding guidelines. The SVG logo definition is complete and well-organized.

internal-packages/database/prisma/schema.prisma (1)

423-424: LGTM! Schema changes properly support runtime metadata.

The addition of optional runtime and runtimeVersion fields to the BackgroundWorker and WorkerDeployment models is well-designed. The optional typing ensures backward compatibility while supporting the new runtime tracking feature.

Also applies to: 1680-1681

packages/cli-v3/src/entryPoints/managed/env.ts (1)

21-21: LGTM! Environment variable properly integrated.

The UV_USE_IO_URING environment variable is correctly added to the schema, getter method, and process environment gathering. The implementation follows the established patterns for other environment variables in the codebase.

Also applies to: 74-76, 224-224

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx (5)

10-10: LGTM! Import statement is properly placed.

The RuntimeIcon import is correctly positioned alphabetically within the component imports section.


193-193: LGTM! Runtime column header is properly positioned.

The new "Runtime" column header is logically placed between "Status" and "Tasks" columns, providing good visual flow for the deployment information.


231-236: LGTM! RuntimeIcon component is properly integrated.

The RuntimeIcon component is correctly implemented with appropriate props:

  • runtime and runtimeVersion from deployment data
  • Consistent styling with other table cells
  • Proper to and isSelected props for navigation

282-282: LGTM! ColSpan updated to match new column count.

The TableBlankRow colSpan is correctly updated from 7 to 8 to accommodate the new "Runtime" column.


342-342: No canRetryIndexing references found; removal is safe.
I ran a global search for canRetryIndexing and found no usages in the repository. It appears this property isn’t defined anywhere, so the simplified condition (if (!canBeRolledBack && !canBePromoted)) is correct.

Likely an incorrect or invalid review comment.

apps/webapp/app/components/RuntimeIcon.tsx (6)

1-4: LGTM! Imports are well-organized and appropriate.

The imports include all necessary dependencies with proper relative paths following the project structure.


6-11: LGTM! Interface definition is comprehensive and well-typed.

The RuntimeIconProps interface properly defines all necessary props with appropriate optional flags and types.


13-22: LGTM! Icon selection logic is clean and extensible.

The getIcon function provides a clear mapping between runtime types and their corresponding icons with proper fallback handling.


24-40: LGTM! Component initialization and runtime parsing is well-implemented.

The component properly:

  • Parses the runtime using the utility function
  • Provides a sensible default to Node.js when no runtime is specified
  • Generates formatted text for display

42-49: LGTM! Label rendering is properly implemented.

The conditional rendering for labels creates a clean inline display with proper gap spacing.


57-58: LGTM! Fallback rendering is appropriate.

The fallback return provides proper handling for cases where tooltip wrapping isn't needed.

apps/webapp/app/utils/runtime.ts (4)

1-10: LGTM! Type definitions are clear and well-documented.

The NormalizedRuntime type and ParsedRuntime interface provide good type safety with comprehensive documentation.


15-32: LGTM! Runtime parsing logic is robust and extensible.

The parseRuntime function properly:

  • Handles null/undefined inputs
  • Uses string prefix matching for flexible runtime detection
  • Provides clear display names for each runtime
  • Returns null for unknown runtimes

34-39: LGTM! Return object structure is well-defined.

The return object provides all necessary information for runtime handling and display.


44-58: LGTM! Version formatting function is clean and user-friendly.

The formatRuntimeWithVersion function provides proper formatting with:

  • Graceful handling of missing runtime or version
  • Clear version prefix formatting
  • Appropriate fallback message for unknown runtimes

Copy link
Member

@ericallam ericallam left a comment

Choose a reason for hiding this comment

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

Needs some changesets 🫡

@nicktrn
Copy link
Collaborator Author

nicktrn commented Jul 9, 2025

let there be changesets

@ericallam
Copy link
Member

What about node 24 which is the "current" release of Node?

@nicktrn
Copy link
Collaborator Author

nicktrn commented Jul 10, 2025

no chance sadly, even 24.0.0 wouldn't work

@nicktrn nicktrn merged commit 0c71dc7 into main Jul 10, 2025
33 checks passed
@nicktrn nicktrn deleted the fix/node-22+bun branch July 10, 2025 15:43
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