From 8fab74c62deb49efdb8f022e6f23afb30c3da08c Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Wed, 9 Jul 2025 10:53:52 +0100 Subject: [PATCH 01/15] update node-22 image --- packages/cli-v3/src/deploy/buildImage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli-v3/src/deploy/buildImage.ts b/packages/cli-v3/src/deploy/buildImage.ts index 65114cccd5..70691d028f 100644 --- a/packages/cli-v3/src/deploy/buildImage.ts +++ b/packages/cli-v3/src/deploy/buildImage.ts @@ -546,7 +546,7 @@ const BASE_IMAGE: Record = { bun: "imbios/bun-node:1.2.1-22-slim@sha256:6c31db8f11f0d37357ef8156c2dab684448b54a1fb50ca1c22bca82bce76c788", node: "node:21.7.3-bookworm-slim@sha256:dfc05dee209a1d7adf2ef189bd97396daad4e97c6eaa85778d6f75205ba1b0fb", "node-22": - "node:22.12.0-bookworm-slim@sha256:a4b757cd491c7f0b57f57951f35f4e85b7e1ad54dbffca4cf9af0725e1650cd8", + "node:22.16.0-bookworm-slim@sha256:048ed02c5fd52e86fda6fbd2f6a76cf0d4492fd6c6fee9e2c463ed5108da0e34", }; const DEFAULT_PACKAGES = ["busybox", "ca-certificates", "dumb-init", "git", "openssl"]; From fac6e4ca91129f3a0b0468ee225054b6909373f3 Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Wed, 9 Jul 2025 11:25:43 +0100 Subject: [PATCH 02/15] update bun image --- packages/cli-v3/src/deploy/buildImage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli-v3/src/deploy/buildImage.ts b/packages/cli-v3/src/deploy/buildImage.ts index 70691d028f..4a5a1e6c9c 100644 --- a/packages/cli-v3/src/deploy/buildImage.ts +++ b/packages/cli-v3/src/deploy/buildImage.ts @@ -543,7 +543,7 @@ export type GenerateContainerfileOptions = { }; const BASE_IMAGE: Record = { - bun: "imbios/bun-node:1.2.1-22-slim@sha256:6c31db8f11f0d37357ef8156c2dab684448b54a1fb50ca1c22bca82bce76c788", + bun: "imbios/bun-node:1.2.18-20-slim@sha256:74067c73e7fe4a4da56f447f644e7090cec4eaf5500a0e384d15855107bea636", node: "node:21.7.3-bookworm-slim@sha256:dfc05dee209a1d7adf2ef189bd97396daad4e97c6eaa85778d6f75205ba1b0fb", "node-22": "node:22.16.0-bookworm-slim@sha256:048ed02c5fd52e86fda6fbd2f6a76cf0d4492fd6c6fee9e2c463ed5108da0e34", From 6fb7d83c848976478a51b95e3807fa812a71253f Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Wed, 9 Jul 2025 11:27:15 +0100 Subject: [PATCH 03/15] disable io_uring --- packages/cli-v3/src/deploy/buildImage.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/cli-v3/src/deploy/buildImage.ts b/packages/cli-v3/src/deploy/buildImage.ts index 4a5a1e6c9c..78893b5482 100644 --- a/packages/cli-v3/src/deploy/buildImage.ts +++ b/packages/cli-v3/src/deploy/buildImage.ts @@ -679,6 +679,7 @@ ENV TRIGGER_PROJECT_ID=\${TRIGGER_PROJECT_ID} \ TRIGGER_DEPLOYMENT_VERSION=\${TRIGGER_DEPLOYMENT_VERSION} \ TRIGGER_CONTENT_HASH=\${TRIGGER_CONTENT_HASH} \ TRIGGER_PROJECT_REF=\${TRIGGER_PROJECT_REF} \ + UV_USE_IO_URING=0 \ NODE_EXTRA_CA_CERTS=\${NODE_EXTRA_CA_CERTS} \ NODE_ENV=production @@ -791,6 +792,7 @@ ENV TRIGGER_PROJECT_ID=\${TRIGGER_PROJECT_ID} \ TRIGGER_DEPLOYMENT_VERSION=\${TRIGGER_DEPLOYMENT_VERSION} \ TRIGGER_CONTENT_HASH=\${TRIGGER_CONTENT_HASH} \ TRIGGER_PROJECT_REF=\${TRIGGER_PROJECT_REF} \ + UV_USE_IO_URING=0 \ NODE_EXTRA_CA_CERTS=\${NODE_EXTRA_CA_CERTS} \ NODE_ENV=production From 4e60d1f5cdb51f138bfd2a4e7ef7a208e9b0c0d7 Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Wed, 9 Jul 2025 11:57:42 +0100 Subject: [PATCH 04/15] fix fallback bun path --- packages/core/src/v3/build/runtime.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/v3/build/runtime.ts b/packages/core/src/v3/build/runtime.ts index dc8ce19c6c..f021f9889d 100644 --- a/packages/core/src/v3/build/runtime.ts +++ b/packages/core/src/v3/build/runtime.ts @@ -2,6 +2,7 @@ import { join } from "node:path"; import { pathToFileURL } from "url"; import { BuildRuntime } from "../schemas/build.js"; import { dedupFlags } from "./flags.js"; +import { homedir } from "node:os"; export const DEFAULT_RUNTIME = "node" satisfies BuildRuntime; @@ -31,7 +32,7 @@ export function execPathForRuntime(runtime: BuildRuntime): string { return join(process.env.BUN_INSTALL_BIN, "bun"); } - return join("~", ".bin", "bin", "bun"); + return join(homedir(), ".bun", "bin", "bun"); default: throw new Error(`Unsupported runtime ${runtime}`); } From 01ef5b25c5e0917cb9ef62a2ee1284ddc1b3434a Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Wed, 9 Jul 2025 12:57:29 +0100 Subject: [PATCH 05/15] prevent duplicate warnings --- packages/cli-v3/src/commands/whoami.ts | 1 + packages/cli-v3/src/config.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/cli-v3/src/commands/whoami.ts b/packages/cli-v3/src/commands/whoami.ts index 0ff278314a..54c5c1dea0 100644 --- a/packages/cli-v3/src/commands/whoami.ts +++ b/packages/cli-v3/src/commands/whoami.ts @@ -87,6 +87,7 @@ export async function whoAmI( loadConfig({ overrides: { project: options?.projectRef ?? envVars.TRIGGER_PROJECT_REF }, configFile: options?.config, + warn: false, }) ); diff --git a/packages/cli-v3/src/config.ts b/packages/cli-v3/src/config.ts index 8cca2d1605..3e4d27d7a3 100644 --- a/packages/cli-v3/src/config.ts +++ b/packages/cli-v3/src/config.ts @@ -27,12 +27,14 @@ export type ResolveConfigOptions = { cwd?: string; overrides?: Partial; configFile?: string; + warn?: boolean; }; export async function loadConfig({ cwd = process.cwd(), overrides, configFile, + warn = true, }: ResolveConfigOptions = {}): Promise { const result = await c12.loadConfig({ name: "trigger", @@ -41,7 +43,7 @@ export async function loadConfig({ jitiOptions: { debug: logger.loggerLevel === "debug" }, }); - return await resolveConfig(cwd, result, overrides); + return await resolveConfig(cwd, result, overrides, warn); } type ResolveWatchConfigOptions = ResolveConfigOptions & { From fcd467eff308166f2d7da9761070aaed6439784b Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Wed, 9 Jul 2025 14:13:19 +0100 Subject: [PATCH 06/15] add runtime and version to deployments --- .../v3/DeploymentListPresenter.server.ts | 6 ++++++ .../presenters/v3/DeploymentPresenter.server.ts | 4 ++++ .../route.tsx | 15 +++++++++++++++ .../route.tsx | 17 ++++++++++++++++- ...createDeploymentBackgroundWorkerV4.server.ts | 2 ++ .../v3/services/initializeDeployment.server.ts | 1 + .../migration.sql | 2 ++ .../migration.sql | 2 ++ internal-packages/database/prisma/schema.prisma | 3 +++ packages/cli-v3/src/commands/deploy.ts | 1 + packages/cli-v3/src/dev/devSupervisor.ts | 2 ++ .../cli-v3/src/entryPoints/dev-index-worker.ts | 2 ++ .../src/entryPoints/managed-index-controller.ts | 2 ++ .../src/entryPoints/managed-index-worker.ts | 2 ++ packages/core/src/v3/build/runtime.ts | 16 ++++++++++++++++ packages/core/src/v3/schemas/api.ts | 1 + packages/core/src/v3/schemas/build.ts | 1 + packages/core/src/v3/schemas/resources.ts | 2 ++ references/bun-catalog/src/trigger/bun.ts | 2 +- references/bun-catalog/trigger.config.ts | 8 +------- 20 files changed, 82 insertions(+), 9 deletions(-) create mode 100644 internal-packages/database/prisma/migrations/20250709115807_add_worker_deployment_runtime/migration.sql create mode 100644 internal-packages/database/prisma/migrations/20250709123917_add_worker_deployment_runtime_version/migration.sql diff --git a/apps/webapp/app/presenters/v3/DeploymentListPresenter.server.ts b/apps/webapp/app/presenters/v3/DeploymentListPresenter.server.ts index c63bb3f5b0..b22a53866b 100644 --- a/apps/webapp/app/presenters/v3/DeploymentListPresenter.server.ts +++ b/apps/webapp/app/presenters/v3/DeploymentListPresenter.server.ts @@ -97,6 +97,8 @@ export class DeploymentListPresenter { id: string; shortCode: string; version: string; + runtime: string | null; + runtimeVersion: string | null; status: WorkerDeploymentStatus; environmentId: string; builtAt: Date | null; @@ -114,6 +116,8 @@ export class DeploymentListPresenter { wd."id", wd."shortCode", wd."version", + wd."runtime", + wd."runtimeVersion", (SELECT COUNT(*) FROM ${sqlDatabaseSchema}."BackgroundWorkerTask" WHERE "BackgroundWorkerTask"."workerId" = wd."workerId") AS "tasksCount", wd."environmentId", wd."status", @@ -148,6 +152,8 @@ LIMIT ${pageSize} OFFSET ${pageSize * (page - 1)};`; id: deployment.id, shortCode: deployment.shortCode, version: deployment.version, + runtime: deployment.runtime, + runtimeVersion: deployment.runtimeVersion, status: deployment.status, builtAt: deployment.builtAt, deployedAt: deployment.deployedAt, diff --git a/apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts b/apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts index e62a68f844..35e6e4184f 100644 --- a/apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts +++ b/apps/webapp/app/presenters/v3/DeploymentPresenter.server.ts @@ -72,6 +72,8 @@ export class DeploymentPresenter { id: true, shortCode: true, version: true, + runtime: true, + runtimeVersion: true, errorData: true, imageReference: true, imagePlatform: true, @@ -157,6 +159,8 @@ export class DeploymentPresenter { deployedBy: deployment.triggeredBy, sdkVersion: deployment.worker?.sdkVersion, cliVersion: deployment.worker?.cliVersion, + runtime: deployment.runtime, + runtimeVersion: deployment.runtimeVersion, imageReference: deployment.imageReference, imagePlatform: deployment.imagePlatform, externalBuildData: diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx index 24e651cf73..892939d01f 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx @@ -169,6 +169,21 @@ export default function Page() { {deployment.cliVersion ? deployment.cliVersion : "–"} + + Runtime + + {deployment.runtime ? ( + <> + {deployment.runtime} + {deployment.runtimeVersion && ( + v{deployment.runtimeVersion} + )} + + ) : ( + "–" + )} + + Worker type {capitalizeWord(deployment.type)} diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx index a92f2159b9..ed3990fb65 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx @@ -166,6 +166,7 @@ export default function Page() { Deploy Version + Runtime @@ -221,6 +222,20 @@ export default function Page() { {deployment.version} + + {deployment.runtime ? ( + <> + {deployment.runtime} + {deployment.runtimeVersion && ( + + v{deployment.runtimeVersion} + + )} + + ) : ( + "–" + )} + + No deploys match your filters diff --git a/apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts b/apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts index 4a7107b7eb..1f9c6f1af8 100644 --- a/apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts +++ b/apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts @@ -160,6 +160,8 @@ export class CreateDeploymentBackgroundWorkerServiceV4 extends BaseService { workerId: backgroundWorker.id, builtAt: new Date(), type: backgroundWorker.engine === "V2" ? "MANAGED" : "V1", + // runtime is already set when the deployment is created, we only need to set the version + runtimeVersion: body.metadata.runtimeVersion, }, }); diff --git a/apps/webapp/app/v3/services/initializeDeployment.server.ts b/apps/webapp/app/v3/services/initializeDeployment.server.ts index 6462c14c24..8370e3fdd9 100644 --- a/apps/webapp/app/v3/services/initializeDeployment.server.ts +++ b/apps/webapp/app/v3/services/initializeDeployment.server.ts @@ -124,6 +124,7 @@ export class InitializeDeploymentService extends BaseService { imageReference: imageRef, imagePlatform: env.DEPLOY_IMAGE_PLATFORM, git: payload.gitMeta ?? undefined, + runtime: payload.runtime ?? undefined, }, }); diff --git a/internal-packages/database/prisma/migrations/20250709115807_add_worker_deployment_runtime/migration.sql b/internal-packages/database/prisma/migrations/20250709115807_add_worker_deployment_runtime/migration.sql new file mode 100644 index 0000000000..2ec4a102ae --- /dev/null +++ b/internal-packages/database/prisma/migrations/20250709115807_add_worker_deployment_runtime/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +ALTER TABLE "WorkerDeployment" ADD COLUMN "runtime" TEXT; \ No newline at end of file diff --git a/internal-packages/database/prisma/migrations/20250709123917_add_worker_deployment_runtime_version/migration.sql b/internal-packages/database/prisma/migrations/20250709123917_add_worker_deployment_runtime_version/migration.sql new file mode 100644 index 0000000000..985155c07f --- /dev/null +++ b/internal-packages/database/prisma/migrations/20250709123917_add_worker_deployment_runtime_version/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +ALTER TABLE "WorkerDeployment" ADD COLUMN "runtimeVersion" TEXT; \ No newline at end of file diff --git a/internal-packages/database/prisma/schema.prisma b/internal-packages/database/prisma/schema.prisma index 86bcf07f48..63bc485dd1 100644 --- a/internal-packages/database/prisma/schema.prisma +++ b/internal-packages/database/prisma/schema.prisma @@ -1645,6 +1645,9 @@ model WorkerDeployment { shortCode String version String + runtime String? + runtimeVersion String? + imageReference String? imagePlatform String @default("linux/amd64") diff --git a/packages/cli-v3/src/commands/deploy.ts b/packages/cli-v3/src/commands/deploy.ts index 9b86196e43..df4c7260c2 100644 --- a/packages/cli-v3/src/commands/deploy.ts +++ b/packages/cli-v3/src/commands/deploy.ts @@ -311,6 +311,7 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) { userId: authorization.userId, gitMeta, type: features.run_engine_v2 ? "MANAGED" : "V1", + runtime: buildManifest.runtime, }); if (!deploymentResponse.success) { diff --git a/packages/cli-v3/src/dev/devSupervisor.ts b/packages/cli-v3/src/dev/devSupervisor.ts index ce3835714d..c55b906cc3 100644 --- a/packages/cli-v3/src/dev/devSupervisor.ts +++ b/packages/cli-v3/src/dev/devSupervisor.ts @@ -215,6 +215,8 @@ class DevSupervisor implements WorkerRuntime { queues: backgroundWorker.manifest.queues, contentHash: manifest.contentHash, sourceFiles, + runtime: backgroundWorker.manifest.runtime, + runtimeVersion: backgroundWorker.manifest.runtimeVersion, }, engine: "V2", supportsLazyAttempts: true, diff --git a/packages/cli-v3/src/entryPoints/dev-index-worker.ts b/packages/cli-v3/src/entryPoints/dev-index-worker.ts index 6ae67dd49d..d44ac53fe5 100644 --- a/packages/cli-v3/src/entryPoints/dev-index-worker.ts +++ b/packages/cli-v3/src/entryPoints/dev-index-worker.ts @@ -17,6 +17,7 @@ import sourceMapSupport from "source-map-support"; import { registerResources } from "../indexing/registerResources.js"; import { env } from "std-env"; import { normalizeImportPath } from "../utilities/normalizeImportPath.js"; +import { detectRuntimeVersion } from "@trigger.dev/core/v3/build"; sourceMapSupport.install({ handleUncaughtExceptions: false, @@ -154,6 +155,7 @@ await sendMessageInCatalog( queues: resourceCatalog.listQueueManifests(), configPath: buildManifest.configPath, runtime: buildManifest.runtime, + runtimeVersion: detectRuntimeVersion(), workerEntryPoint: buildManifest.runWorkerEntryPoint, controllerEntryPoint: buildManifest.runControllerEntryPoint, loaderEntryPoint: buildManifest.loaderEntryPoint, diff --git a/packages/cli-v3/src/entryPoints/managed-index-controller.ts b/packages/cli-v3/src/entryPoints/managed-index-controller.ts index e3cc53839e..9b8c822839 100644 --- a/packages/cli-v3/src/entryPoints/managed-index-controller.ts +++ b/packages/cli-v3/src/entryPoints/managed-index-controller.ts @@ -104,6 +104,8 @@ async function indexDeployment({ tasks: workerManifest.tasks, queues: workerManifest.queues, sourceFiles, + runtime: workerManifest.runtime, + runtimeVersion: workerManifest.runtimeVersion, }, engine: "V2", supportsLazyAttempts: true, diff --git a/packages/cli-v3/src/entryPoints/managed-index-worker.ts b/packages/cli-v3/src/entryPoints/managed-index-worker.ts index 426f31bf27..845ece47af 100644 --- a/packages/cli-v3/src/entryPoints/managed-index-worker.ts +++ b/packages/cli-v3/src/entryPoints/managed-index-worker.ts @@ -17,6 +17,7 @@ import sourceMapSupport from "source-map-support"; import { registerResources } from "../indexing/registerResources.js"; import { env } from "std-env"; import { normalizeImportPath } from "../utilities/normalizeImportPath.js"; +import { detectRuntimeVersion } from "@trigger.dev/core/v3/build"; sourceMapSupport.install({ handleUncaughtExceptions: false, @@ -154,6 +155,7 @@ await sendMessageInCatalog( queues: resourceCatalog.listQueueManifests(), configPath: buildManifest.configPath, runtime: buildManifest.runtime, + runtimeVersion: detectRuntimeVersion(), workerEntryPoint: buildManifest.runWorkerEntryPoint, controllerEntryPoint: buildManifest.runControllerEntryPoint, loaderEntryPoint: buildManifest.loaderEntryPoint, diff --git a/packages/core/src/v3/build/runtime.ts b/packages/core/src/v3/build/runtime.ts index f021f9889d..1618a50ffd 100644 --- a/packages/core/src/v3/build/runtime.ts +++ b/packages/core/src/v3/build/runtime.ts @@ -85,3 +85,19 @@ function nodeRuntimeNeedsGlobalWebCryptoFlag(): boolean { return false; } } + +export function detectRuntimeVersion(): string | undefined { + try { + // Check if we're running under Bun + const isBun = typeof process.versions.bun === "string"; + + if (isBun) { + return process.versions.bun; + } + + // Otherwise, return Node.js version + return process.versions.node; + } catch { + return undefined; + } +} diff --git a/packages/core/src/v3/schemas/api.ts b/packages/core/src/v3/schemas/api.ts index 399f1229dd..7b348ba069 100644 --- a/packages/core/src/v3/schemas/api.ts +++ b/packages/core/src/v3/schemas/api.ts @@ -348,6 +348,7 @@ export const InitializeDeploymentRequestBody = z.object({ selfHosted: z.boolean().optional(), gitMeta: GitMeta.optional(), type: z.enum(["MANAGED", "UNMANAGED", "V1"]).optional(), + runtime: z.string().optional(), }); export type InitializeDeploymentRequestBody = z.infer; diff --git a/packages/core/src/v3/schemas/build.ts b/packages/core/src/v3/schemas/build.ts index 3dc9e83dcf..ee33bb7efb 100644 --- a/packages/core/src/v3/schemas/build.ts +++ b/packages/core/src/v3/schemas/build.ts @@ -90,6 +90,7 @@ export const WorkerManifest = z.object({ loaderEntryPoint: z.string().optional(), initEntryPoint: z.string().optional(), // Optional init.ts entry point runtime: BuildRuntime, + runtimeVersion: z.string().optional(), customConditions: z.array(z.string()).optional(), timings: z.record(z.number()).optional(), processKeepAlive: z diff --git a/packages/core/src/v3/schemas/resources.ts b/packages/core/src/v3/schemas/resources.ts index bcca03d290..ec2b180bbc 100644 --- a/packages/core/src/v3/schemas/resources.ts +++ b/packages/core/src/v3/schemas/resources.ts @@ -33,6 +33,8 @@ export const BackgroundWorkerMetadata = z.object({ tasks: z.array(TaskResource), queues: z.array(QueueManifest).optional(), sourceFiles: z.array(BackgroundWorkerSourceFileMetadata).optional(), + runtime: z.string().optional(), + runtimeVersion: z.string().optional(), }); export type BackgroundWorkerMetadata = z.infer; diff --git a/references/bun-catalog/src/trigger/bun.ts b/references/bun-catalog/src/trigger/bun.ts index ef6e8d9f25..a5d14fa5b0 100644 --- a/references/bun-catalog/src/trigger/bun.ts +++ b/references/bun-catalog/src/trigger/bun.ts @@ -1,5 +1,5 @@ import { Database } from "bun:sqlite"; -import { task } from "@trigger.dev/sdk/v3"; +import { task } from "@trigger.dev/sdk"; export const bunTask = task({ id: "bun-task", diff --git a/references/bun-catalog/trigger.config.ts b/references/bun-catalog/trigger.config.ts index a2deb7398e..67045bf8d5 100644 --- a/references/bun-catalog/trigger.config.ts +++ b/references/bun-catalog/trigger.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from "@trigger.dev/sdk/v3"; +import { defineConfig } from "@trigger.dev/sdk"; export default defineConfig({ runtime: "bun", @@ -17,10 +17,4 @@ export default defineConfig({ }, enableConsoleLogging: false, logLevel: "info", - onStart: async (payload, { ctx }) => { - console.log(`Task ${ctx.task.id} started ${ctx.run.id}`); - }, - onFailure: async (payload, error, { ctx }) => { - console.log(`Task ${ctx.task.id} failed ${ctx.run.id}`); - }, }); From 3001f55abea768133a9c70050aa46c711b70623a Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Wed, 9 Jul 2025 17:54:46 +0100 Subject: [PATCH 07/15] runtime icons --- apps/webapp/app/assets/icons/BunLogoIcon.tsx | 94 +++++++++++++++++++ .../app/assets/icons/NodejsLogoIcon.tsx | 15 +++ apps/webapp/app/components/RuntimeIcon.tsx | 55 +++++++++++ .../route.tsx | 16 ++-- .../route.tsx | 23 ++--- apps/webapp/app/utils/runtime.ts | 58 ++++++++++++ 6 files changed, 236 insertions(+), 25 deletions(-) create mode 100644 apps/webapp/app/assets/icons/BunLogoIcon.tsx create mode 100644 apps/webapp/app/assets/icons/NodejsLogoIcon.tsx create mode 100644 apps/webapp/app/components/RuntimeIcon.tsx create mode 100644 apps/webapp/app/utils/runtime.ts diff --git a/apps/webapp/app/assets/icons/BunLogoIcon.tsx b/apps/webapp/app/assets/icons/BunLogoIcon.tsx new file mode 100644 index 0000000000..b7357189f7 --- /dev/null +++ b/apps/webapp/app/assets/icons/BunLogoIcon.tsx @@ -0,0 +1,94 @@ +export function BunLogoIcon({ className }: { className?: string }) { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +} diff --git a/apps/webapp/app/assets/icons/NodejsLogoIcon.tsx b/apps/webapp/app/assets/icons/NodejsLogoIcon.tsx new file mode 100644 index 0000000000..234dd079e1 --- /dev/null +++ b/apps/webapp/app/assets/icons/NodejsLogoIcon.tsx @@ -0,0 +1,15 @@ +export function NodejsLogoIcon({ className }: { className?: string }) { + return ( + + + + + + + + + + + + ); +} diff --git a/apps/webapp/app/components/RuntimeIcon.tsx b/apps/webapp/app/components/RuntimeIcon.tsx new file mode 100644 index 0000000000..e39de5bf9b --- /dev/null +++ b/apps/webapp/app/components/RuntimeIcon.tsx @@ -0,0 +1,55 @@ +import { SimpleTooltip } from "~/components/primitives/Tooltip"; +import { BunLogoIcon } from "~/assets/icons/BunLogoIcon"; +import { NodejsLogoIcon } from "~/assets/icons/NodejsLogoIcon"; +import { parseRuntime, formatRuntimeWithVersion } from "~/utils/runtime"; + +interface RuntimeIconProps { + runtime?: string | null; + runtimeVersion?: string | null; + className?: string; + withLabel?: boolean; +} + +export function RuntimeIcon({ + runtime, + runtimeVersion, + className = "h-4 w-4", + withLabel = false, +}: RuntimeIconProps) { + const parsedRuntime = parseRuntime(runtime); + + if (!parsedRuntime) { + return ; + } + + const getIcon = () => { + switch (parsedRuntime.runtime) { + case "bun": + return ; + case "node": + return ; + default: + return ; + } + }; + + const icon = getIcon(); + const formattedText = formatRuntimeWithVersion(runtime, runtimeVersion); + + if (withLabel) { + return ( + + {icon} + {formattedText} + + ); + } + + if (typeof icon === "object" && "type" in icon) { + return ( + + ); + } + + return icon; +} diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx index 892939d01f..0575d7e758 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam/route.tsx @@ -3,6 +3,7 @@ import { type LoaderFunctionArgs } from "@remix-run/server-runtime"; import { typedjson, useTypedLoaderData } from "remix-typedjson"; import { ExitIcon } from "~/assets/icons/ExitIcon"; import { GitMetadata } from "~/components/GitMetadata"; +import { RuntimeIcon } from "~/components/RuntimeIcon"; import { UserAvatar } from "~/components/UserProfilePhoto"; import { AdminDebugTooltip } from "~/components/admin/debugTooltip"; import { EnvironmentCombo } from "~/components/environments/EnvironmentLabel"; @@ -172,16 +173,11 @@ export default function Page() { Runtime - {deployment.runtime ? ( - <> - {deployment.runtime} - {deployment.runtimeVersion && ( - v{deployment.runtimeVersion} - )} - - ) : ( - "–" - )} + diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx index ed3990fb65..58fc8ef65e 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx @@ -7,6 +7,7 @@ import { z } from "zod"; import { PromoteIcon } from "~/assets/icons/PromoteIcon"; import { DeploymentsNone, DeploymentsNoneDev } from "~/components/BlankStatePanels"; import { GitMetadata } from "~/components/GitMetadata"; +import { RuntimeIcon } from "~/components/RuntimeIcon"; import { UserAvatar } from "~/components/UserProfilePhoto"; import { MainCenteredContainer, PageBody, PageContainer } from "~/components/layout/AppLayout"; import { Badge } from "~/components/primitives/Badge"; @@ -166,7 +167,6 @@ export default function Page() { Deploy Version - Runtime @@ -191,6 +191,7 @@ export default function Page() { > Status + Runtime Tasks Deployed at Deployed by @@ -222,26 +223,18 @@ export default function Page() { {deployment.version} - - {deployment.runtime ? ( - <> - {deployment.runtime} - {deployment.runtimeVersion && ( - - v{deployment.runtimeVersion} - - )} - - ) : ( - "–" - )} - + + + {deployment.tasksCount !== null ? deployment.tasksCount : "–"} diff --git a/apps/webapp/app/utils/runtime.ts b/apps/webapp/app/utils/runtime.ts new file mode 100644 index 0000000000..73ed6b93e2 --- /dev/null +++ b/apps/webapp/app/utils/runtime.ts @@ -0,0 +1,58 @@ +export type NormalizedRuntime = "node" | "bun"; + +export interface ParsedRuntime { + /** The normalized runtime type */ + runtime: NormalizedRuntime; + /** The original runtime string */ + originalRuntime: string; + /** The display name for the runtime */ + displayName: string; +} + +/** + * Parses a runtime string and returns normalized runtime information + */ +export function parseRuntime(runtime: string | null | undefined): ParsedRuntime | null { + if (!runtime) { + return null; + } + + // Normalize runtime strings + let normalizedRuntime: NormalizedRuntime; + let displayName: string; + + if (runtime.startsWith("bun")) { + normalizedRuntime = "bun"; + displayName = "Bun"; + } else if (runtime.startsWith("node")) { + normalizedRuntime = "node"; + displayName = "Node.js"; + } else { + return null; + } + + return { + runtime: normalizedRuntime, + originalRuntime: runtime, + displayName, + }; +} + +/** + * Formats runtime with version for display + */ +export function formatRuntimeWithVersion( + runtime: string | null | undefined, + version: string | null | undefined +): string { + const parsed = parseRuntime(runtime); + if (!parsed) { + return "Unknown runtime"; + } + + if (version) { + return `${parsed.displayName} v${version}`; + } + + return parsed.displayName; +} From 00ee5566fbbfaefde2758a8c7495c9c8d4a0123f Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Wed, 9 Jul 2025 18:00:16 +0100 Subject: [PATCH 08/15] fallback to nodejs --- apps/webapp/app/components/RuntimeIcon.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/webapp/app/components/RuntimeIcon.tsx b/apps/webapp/app/components/RuntimeIcon.tsx index e39de5bf9b..dd96a3ccf8 100644 --- a/apps/webapp/app/components/RuntimeIcon.tsx +++ b/apps/webapp/app/components/RuntimeIcon.tsx @@ -18,12 +18,15 @@ export function RuntimeIcon({ }: RuntimeIconProps) { const parsedRuntime = parseRuntime(runtime); - if (!parsedRuntime) { - return ; - } + // Default to Node.js if no runtime is specified + const effectiveRuntime = parsedRuntime || { + runtime: "node" as const, + originalRuntime: "node", + displayName: "Node.js", + }; const getIcon = () => { - switch (parsedRuntime.runtime) { + switch (effectiveRuntime.runtime) { case "bun": return ; case "node": @@ -34,7 +37,7 @@ export function RuntimeIcon({ }; const icon = getIcon(); - const formattedText = formatRuntimeWithVersion(runtime, runtimeVersion); + const formattedText = formatRuntimeWithVersion(effectiveRuntime.originalRuntime, runtimeVersion); if (withLabel) { return ( From 42b114baa7ef1a80fc2fdc399e58c89acc6d80a1 Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Wed, 9 Jul 2025 18:29:41 +0100 Subject: [PATCH 09/15] prevent empty table cell menu --- .../route.tsx | 4 +--- apps/webapp/app/v3/deploymentStatus.ts | 11 ----------- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 apps/webapp/app/v3/deploymentStatus.ts diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx index 58fc8ef65e..dbb0ede67c 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments/route.tsx @@ -52,7 +52,6 @@ import { requireUserId } from "~/services/session.server"; import { titleCase } from "~/utils"; import { EnvironmentParamSchema, docsPath, v3DeploymentPath } from "~/utils/pathBuilder"; import { createSearchParams } from "~/utils/searchParams"; -import { deploymentIndexingIsRetryable } from "~/v3/deploymentStatus"; import { compareDeploymentVersions } from "~/v3/utils/deploymentVersions"; export const meta: MetaFunction = () => { @@ -334,14 +333,13 @@ function DeploymentActionsCell({ const project = useProject(); const canBeMadeCurrent = !deployment.isCurrent && deployment.isDeployed; - const canRetryIndexing = deployment.isLatest && deploymentIndexingIsRetryable(deployment); const canBeRolledBack = canBeMadeCurrent && currentDeployment?.version && compareDeploymentVersions(deployment.version, currentDeployment.version) === -1; const canBePromoted = canBeMadeCurrent && !canBeRolledBack; - if (!canBeMadeCurrent && !canRetryIndexing) { + if (!canBeRolledBack && !canBePromoted) { return ( {""} diff --git a/apps/webapp/app/v3/deploymentStatus.ts b/apps/webapp/app/v3/deploymentStatus.ts deleted file mode 100644 index f93be7dbc7..0000000000 --- a/apps/webapp/app/v3/deploymentStatus.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { WorkerDeployment } from "@trigger.dev/database"; - -export const deploymentIndexingIsRetryable = ({ - builtAt, - status, -}: { - builtAt: Date | null; - status: WorkerDeployment["status"]; -}) => { - return builtAt && (status === "FAILED" || status === "TIMED_OUT"); -}; From 8a00854b220813a920dfbaa15ff785582204b0d5 Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Wed, 9 Jul 2025 19:16:01 +0100 Subject: [PATCH 10/15] log if local build on deploy --- packages/cli-v3/src/commands/deploy.ts | 29 ++++++++++++++++---------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/packages/cli-v3/src/commands/deploy.ts b/packages/cli-v3/src/commands/deploy.ts index df4c7260c2..b64e600014 100644 --- a/packages/cli-v3/src/commands/deploy.ts +++ b/packages/cli-v3/src/commands/deploy.ts @@ -390,13 +390,16 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) { const $spinner = spinner(); + const buildSuffix = isLocalBuild ? " (local)" : ""; + const deploySuffix = isLocalBuild ? " (local build)" : ""; + if (isCI) { log.step(`Building version ${version}\n`); } else { if (isLinksSupported) { - $spinner.start(`Building version ${version} ${deploymentLink}`); + $spinner.start(`Building version ${version}${buildSuffix} ${deploymentLink}`); } else { - $spinner.start(`Building version ${version}`); + $spinner.start(`Building version ${version}${buildSuffix}`); } } @@ -427,9 +430,11 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) { } if (isLinksSupported) { - $spinner.message(`Building version ${version} ${deploymentLink}: ${logMessage}`); + $spinner.message( + `Building version ${version}${buildSuffix} ${deploymentLink}: ${logMessage}` + ); } else { - $spinner.message(`Building version ${version}: ${logMessage}`); + $spinner.message(`Building version ${version}${buildSuffix}: ${logMessage}`); } }, // Local build options @@ -505,12 +510,12 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) { } if (isCI) { - log.step(`Deploying version ${version}\n`); + log.step(`Deploying version ${version}${deploySuffix}\n`); } else { if (isLinksSupported) { - $spinner.message(`Deploying version ${version} ${deploymentLink}`); + $spinner.message(`Deploying version ${version}${deploySuffix} ${deploymentLink}`); } else { - $spinner.message(`Deploying version ${version}`); + $spinner.message(`Deploying version ${version}${deploySuffix}`); } } @@ -527,9 +532,11 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) { } if (isLinksSupported) { - $spinner.message(`Deploying version ${version} ${deploymentLink}: ${logMessage}`); + $spinner.message( + `Deploying version ${version}${deploySuffix} ${deploymentLink}: ${logMessage}` + ); } else { - $spinner.message(`Deploying version ${version}: ${logMessage}`); + $spinner.message(`Deploying version ${version}${deploySuffix}: ${logMessage}`); } } ); @@ -547,9 +554,9 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) { } if (isCI) { - log.step(`Successfully deployed version ${version}`); + log.step(`Successfully deployed version ${version}${deploySuffix}`); } else { - $spinner.stop(`Successfully deployed version ${version}`); + $spinner.stop(`Successfully deployed version ${version}${deploySuffix}`); } const taskCount = deploymentWithWorker.worker?.tasks.length ?? 0; From 2a655e765412720dba4ddc5d1837bd9fd37083c9 Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Wed, 9 Jul 2025 19:16:31 +0100 Subject: [PATCH 11/15] pass io_uring env var to child --- packages/cli-v3/src/entryPoints/managed/env.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/cli-v3/src/entryPoints/managed/env.ts b/packages/cli-v3/src/entryPoints/managed/env.ts index 87b5483354..68a403d3da 100644 --- a/packages/cli-v3/src/entryPoints/managed/env.ts +++ b/packages/cli-v3/src/entryPoints/managed/env.ts @@ -18,6 +18,7 @@ const Env = z.object({ TRIGGER_PROJECT_REF: z.string(), NODE_ENV: z.string().default("production"), NODE_EXTRA_CA_CERTS: z.string().optional(), + UV_USE_IO_URING: z.string().optional(), // Set at runtime TRIGGER_WORKLOAD_CONTROLLER_ID: z.string().default(`controller_${randomUUID()}`), @@ -70,6 +71,9 @@ export class RunnerEnv { get NODE_EXTRA_CA_CERTS() { return this.env.NODE_EXTRA_CA_CERTS; } + get UV_USE_IO_URING() { + return this.env.UV_USE_IO_URING; + } get OTEL_EXPORTER_OTLP_ENDPOINT() { return this.env.OTEL_EXPORTER_OTLP_ENDPOINT; } @@ -217,6 +221,7 @@ export class RunnerEnv { NODE_ENV: this.NODE_ENV, NODE_EXTRA_CA_CERTS: this.NODE_EXTRA_CA_CERTS, OTEL_EXPORTER_OTLP_ENDPOINT: this.OTEL_EXPORTER_OTLP_ENDPOINT, + UV_USE_IO_URING: this.UV_USE_IO_URING, }; // Filter out undefined values From 222908b483688b69caac18a88c601a049cb57020 Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Wed, 9 Jul 2025 20:21:52 +0100 Subject: [PATCH 12/15] denormalize runtime and version, display on run details --- apps/webapp/app/components/RuntimeIcon.tsx | 26 +++++++++--------- .../app/presenters/v3/SpanPresenter.server.ts | 4 +++ .../route.tsx | 11 ++++++++ .../services/createBackgroundWorker.server.ts | 2 ++ .../migration.sql | 3 +++ .../database/prisma/schema.prisma | 27 ++++++++++--------- 6 files changed, 48 insertions(+), 25 deletions(-) create mode 100644 internal-packages/database/prisma/migrations/20250709191244_add_runtime_and_runtime_version_to_background_worker/migration.sql diff --git a/apps/webapp/app/components/RuntimeIcon.tsx b/apps/webapp/app/components/RuntimeIcon.tsx index dd96a3ccf8..f0626e97a3 100644 --- a/apps/webapp/app/components/RuntimeIcon.tsx +++ b/apps/webapp/app/components/RuntimeIcon.tsx @@ -1,7 +1,7 @@ import { SimpleTooltip } from "~/components/primitives/Tooltip"; import { BunLogoIcon } from "~/assets/icons/BunLogoIcon"; import { NodejsLogoIcon } from "~/assets/icons/NodejsLogoIcon"; -import { parseRuntime, formatRuntimeWithVersion } from "~/utils/runtime"; +import { parseRuntime, formatRuntimeWithVersion, type NormalizedRuntime } from "~/utils/runtime"; interface RuntimeIconProps { runtime?: string | null; @@ -10,6 +10,17 @@ interface RuntimeIconProps { withLabel?: boolean; } +const getIcon = (runtime: NormalizedRuntime, className: string) => { + switch (runtime) { + case "bun": + return ; + case "node": + return ; + default: + return ; + } +}; + export function RuntimeIcon({ runtime, runtimeVersion, @@ -25,18 +36,7 @@ export function RuntimeIcon({ displayName: "Node.js", }; - const getIcon = () => { - switch (effectiveRuntime.runtime) { - case "bun": - return ; - case "node": - return ; - default: - return ; - } - }; - - const icon = getIcon(); + const icon = getIcon(effectiveRuntime.runtime, className); const formattedText = formatRuntimeWithVersion(effectiveRuntime.originalRuntime, runtimeVersion); if (withLabel) { diff --git a/apps/webapp/app/presenters/v3/SpanPresenter.server.ts b/apps/webapp/app/presenters/v3/SpanPresenter.server.ts index 262184dcb9..b2fd1d1c16 100644 --- a/apps/webapp/app/presenters/v3/SpanPresenter.server.ts +++ b/apps/webapp/app/presenters/v3/SpanPresenter.server.ts @@ -142,6 +142,8 @@ export class SpanPresenter extends BasePresenter { select: { version: true, sdkVersion: true, + runtime: true, + runtimeVersion: true, }, }, engine: true, @@ -326,6 +328,8 @@ export class SpanPresenter extends BasePresenter { taskIdentifier: run.taskIdentifier, version: run.lockedToVersion?.version, sdkVersion: run.lockedToVersion?.sdkVersion, + runtime: run.lockedToVersion?.runtime, + runtimeVersion: run.lockedToVersion?.runtimeVersion, isTest: run.isTest, environmentId: run.runtimeEnvironment.id, idempotencyKey: run.idempotencyKey, diff --git a/apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx b/apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx index e8d527a6c2..22dbacde41 100644 --- a/apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx +++ b/apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx @@ -36,6 +36,7 @@ import { import { TabButton, TabContainer } from "~/components/primitives/Tabs"; import { TextLink } from "~/components/primitives/TextLink"; import { InfoIconTooltip, SimpleTooltip } from "~/components/primitives/Tooltip"; +import { RuntimeIcon } from "~/components/RuntimeIcon"; import { RunTimeline, RunTimelineEvent, SpanTimeline } from "~/components/run/RunTimeline"; import { PacketDisplay } from "~/components/runs/v3/PacketDisplay"; import { RunIcon } from "~/components/runs/v3/RunIcon"; @@ -575,6 +576,16 @@ function RunBody({ )} + + Runtime + + + + Test run diff --git a/apps/webapp/app/v3/services/createBackgroundWorker.server.ts b/apps/webapp/app/v3/services/createBackgroundWorker.server.ts index c0b6c49ae2..cc8bb2ca99 100644 --- a/apps/webapp/app/v3/services/createBackgroundWorker.server.ts +++ b/apps/webapp/app/v3/services/createBackgroundWorker.server.ts @@ -81,6 +81,8 @@ export class CreateBackgroundWorkerService extends BaseService { contentHash: body.metadata.contentHash, cliVersion: body.metadata.cliPackageVersion, sdkVersion: body.metadata.packageVersion, + runtime: body.metadata.runtime, + runtimeVersion: body.metadata.runtimeVersion, supportsLazyAttempts: body.supportsLazyAttempts, engine: body.engine, }, diff --git a/internal-packages/database/prisma/migrations/20250709191244_add_runtime_and_runtime_version_to_background_worker/migration.sql b/internal-packages/database/prisma/migrations/20250709191244_add_runtime_and_runtime_version_to_background_worker/migration.sql new file mode 100644 index 0000000000..b7a7c2444e --- /dev/null +++ b/internal-packages/database/prisma/migrations/20250709191244_add_runtime_and_runtime_version_to_background_worker/migration.sql @@ -0,0 +1,3 @@ +-- AlterTable +ALTER TABLE "BackgroundWorker" ADD COLUMN "runtime" TEXT, +ADD COLUMN "runtimeVersion" TEXT; \ No newline at end of file diff --git a/internal-packages/database/prisma/schema.prisma b/internal-packages/database/prisma/schema.prisma index b41a859aac..2ce5de2b5c 100644 --- a/internal-packages/database/prisma/schema.prisma +++ b/internal-packages/database/prisma/schema.prisma @@ -420,6 +420,9 @@ model BackgroundWorker { version String metadata Json + runtime String? + runtimeVersion String? + createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@ -719,24 +722,24 @@ model TaskRun { model TaskRunTemplate { id String @id @default(cuid()) - taskSlug String + taskSlug String triggerSource TaskTriggerSource label String - payload String? - payloadType String @default("application/json") - metadata String? - metadataType String @default("application/json") - queue String? - concurrencyKey String? - ttlSeconds Int? - maxAttempts Int? + payload String? + payloadType String @default("application/json") + metadata String? + metadataType String @default("application/json") + queue String? + concurrencyKey String? + ttlSeconds Int? + maxAttempts Int? maxDurationSeconds Int? - tags String[] - machinePreset String? + tags String[] + machinePreset String? - projectId String + projectId String organizationId String createdAt DateTime @default(now()) From b5f0f092790ad23f45202f9b74f85658fa6548a7 Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Wed, 9 Jul 2025 22:49:22 +0100 Subject: [PATCH 13/15] add changesets --- .changeset/eight-ligers-help.md | 5 +++++ .changeset/sixty-beers-share.md | 6 ++++++ .changeset/soft-candles-do.md | 5 +++++ .changeset/yellow-cars-tell.md | 5 +++++ 4 files changed, 21 insertions(+) create mode 100644 .changeset/eight-ligers-help.md create mode 100644 .changeset/sixty-beers-share.md create mode 100644 .changeset/soft-candles-do.md create mode 100644 .changeset/yellow-cars-tell.md diff --git a/.changeset/eight-ligers-help.md b/.changeset/eight-ligers-help.md new file mode 100644 index 0000000000..57c832b0be --- /dev/null +++ b/.changeset/eight-ligers-help.md @@ -0,0 +1,5 @@ +--- +"trigger.dev": patch +--- + +Enhance deploy command output to better distinguish between local and remote builds diff --git a/.changeset/sixty-beers-share.md b/.changeset/sixty-beers-share.md new file mode 100644 index 0000000000..862628e2c1 --- /dev/null +++ b/.changeset/sixty-beers-share.md @@ -0,0 +1,6 @@ +--- +"trigger.dev": patch +"@trigger.dev/core": patch +--- + +Add runtime version detection for display in the dashboard diff --git a/.changeset/soft-candles-do.md b/.changeset/soft-candles-do.md new file mode 100644 index 0000000000..e423053d45 --- /dev/null +++ b/.changeset/soft-candles-do.md @@ -0,0 +1,5 @@ +--- +"trigger.dev": patch +--- + +Update base images to latest compatible versions. The `node-22` runtime now uses v22.16.0 and `bun` uses the latest v1.2.18 release. The default `node` runtime is unchanged and points at v21.7.3. diff --git a/.changeset/yellow-cars-tell.md b/.changeset/yellow-cars-tell.md new file mode 100644 index 0000000000..a27ce329c2 --- /dev/null +++ b/.changeset/yellow-cars-tell.md @@ -0,0 +1,5 @@ +--- +"@trigger.dev/core": patch +--- + +Fix Bun runtime path resolution fallback From 8b44caeeb8beedb5106f170e534af62e4d0692f2 Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Wed, 9 Jul 2025 22:54:39 +0100 Subject: [PATCH 14/15] disable pr checks for changeset commits.. --- .github/workflows/pr_checks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index b00475ebfa..b6be1eddfa 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -5,6 +5,7 @@ on: types: [opened, synchronize, reopened] paths-ignore: - "docs/**" + - ".changeset/**" concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} From d2ffd973f41fb3e4aefe400bd023afa473a2b157 Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Wed, 9 Jul 2025 23:16:56 +0100 Subject: [PATCH 15/15] add runtime data to deployed bg workers --- .../v3/services/createDeploymentBackgroundWorkerV4.server.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts b/apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts index 1f9c6f1af8..2fb32966de 100644 --- a/apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts +++ b/apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV4.server.ts @@ -71,6 +71,8 @@ export class CreateDeploymentBackgroundWorkerServiceV4 extends BaseService { sdkVersion: body.metadata.packageVersion, supportsLazyAttempts: body.supportsLazyAttempts, engine: body.engine, + runtime: body.metadata.runtime, + runtimeVersion: body.metadata.runtimeVersion, }, });