Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/telnet-dev-logs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@trigger.dev/core": patch
---

Add a `@trigger.dev/core/v3/telnetLogServer` module: the shared `TelnetLogServer` (localhost-only, backpressure-safe), `formatLogLine`, and `stripAnsi` helpers, plus an optional static `Logger.onLog` / `SimpleStructuredLogger.onLog` sink used to fan structured logs out to a local dev-only telnet/TCP stream.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres?schema=publi
# See: https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#fields:~:text=the%20shadow%20database.-,directUrl,-No
DIRECT_URL=${DATABASE_URL}
REMIX_APP_PORT=3030
# Dev-only: stream the webapp's logs over a local telnet/TCP socket (nc localhost 6767). Uncomment to enable.
# WEBAPP_TELNET_LOGS_PORT=6767
APP_ENV=development
APP_ORIGIN=http://localhost:3030
ELECTRIC_ORIGIN=http://localhost:3060
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changesets-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/claude.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

- name: 📥 Download deps
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

- name: 📥 Download deps
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-webapp-auth-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

- name: 🐳 Login to DockerHub
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-webapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

# ..to avoid rate limits when pulling images
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1

- name: 📥 Download deps
run: pnpm install --frozen-lockfile --filter trigger.dev...
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-testbox-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1

- name: 📥 Download CLI deps
run: pnpm install --frozen-lockfile --filter trigger.dev...
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/pr-testbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,10 @@ jobs:
with:
version: 10.33.2

- name: ⎔ Setup Node 22 for SDK compatibility checks
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22.12

- name: ⎔ Setup active Node 20
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

- name: 🥟 Setup Bun
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preview-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.0
node-version: 22.23.1
cache: "pnpm"

- name: 📥 Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

# npm v11.5.1 or newer is required for OIDC support
Expand Down Expand Up @@ -288,7 +288,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

# npm v11.5.1 or newer is required for OIDC support
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sdk-compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
os: [blacksmith-4vcpu-ubuntu-2404]
node: ["20.20", "22.12"]
node: ["20.20", "22.23", "24.18", "26.4"]

steps:
- name: ⬇️ Checkout repo
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

- name: 🥟 Setup Bun
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

- name: 🦕 Setup Deno
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

- name: 📥 Download deps
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

- name: 📥 Download deps
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

# ..to avoid rate limits when pulling images
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
# no cache enabled, we're not installing deps

- name: Download blob reports from GitHub Actions Artifacts
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

# ..to avoid rate limits when pulling images
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
# no cache enabled, we're not installing deps

- name: Download blob reports from GitHub Actions Artifacts
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests-webapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

# ..to avoid rate limits when pulling images
Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
# no cache enabled, we're not installing deps

- name: Download blob reports from GitHub Actions Artifacts
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.20.2
v22.23.1
6 changes: 6 additions & 0 deletions .server-changes/error-display-fullscreen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
area: webapp
type: fix
---

Error page now always renders full screen, and its "Go to homepage" shortcut changed from Cmd/Ctrl+G to Enter.
6 changes: 6 additions & 0 deletions .server-changes/fix-resume-user-paused-environment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
area: webapp
type: fix
---

Fixed manually paused environments not being resumable. Resuming incorrectly failed with a billing-limit error even when no billing limit was in effect.
6 changes: 6 additions & 0 deletions .server-changes/supervisor-telnet-logs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
area: supervisor
type: feature
---

Add an opt-in, dev-only telnet log stream: set `SUPERVISOR_TELNET_LOGS_PORT` (e.g. 6769) to tail this process's logs as plain text over a local TCP socket (`nc localhost 6769`). Bound to localhost; off unless the port is set.
6 changes: 6 additions & 0 deletions .server-changes/task-landing-title-truncate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
area: webapp
type: fix
---

Truncate long task names in the task landing page side menu so they no longer push the Test button off the edge.
6 changes: 6 additions & 0 deletions .server-changes/webapp-telnet-logs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
area: webapp
type: feature
---

Add an opt-in, dev-only telnet log stream: set `WEBAPP_TELNET_LOGS_PORT` (e.g. 6767) to tail this process's logs as plain text over a local TCP socket (`nc localhost 6767`). Bound to localhost; off unless the port is set.
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This repository is a pnpm monorepo managed with Turbo. It contains multiple apps
See `ai/references/repo.md` for a more complete explanation of the workspaces.

## Development setup
1. Install dependencies with `pnpm i` (pnpm `10.33.2` and Node.js `20.20.2` are required).
1. Install dependencies with `pnpm i` (pnpm `10.33.2` and Node.js `22.23.1` are required).
2. Copy `.env.example` to `.env` and generate a random 16 byte hex string for `ENCRYPTION_KEY` (`openssl rand -hex 16`). Update other secrets if needed.
3. Start the local services with Docker:
```bash
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ branch are tagged into a release periodically.

### Prerequisites

- [Node.js](https://nodejs.org/en) version 20.20.2
- [Node.js](https://nodejs.org/en) version 22.23.1
- [pnpm package manager](https://pnpm.io/installation) version 10.33.2
- [Docker](https://www.docker.com/get-started/)
- [protobuf](https://github.com/protocolbuffers/protobuf)
Expand All @@ -49,7 +49,7 @@ branch are tagged into a release periodically.
```
cd trigger.dev
```
3. Ensure you are on the correct version of Node.js (20.20.2). If you are using `nvm`, there is an `.nvmrc` file that will automatically select the correct version of Node.js when you navigate to the repository.
3. Ensure you are on the correct version of Node.js (22.23.1). If you are using `nvm`, there is an `.nvmrc` file that will automatically select the correct version of Node.js when you navigate to the repository.

4. Run `corepack enable` to use the correct version of pnpm (`10.33.2`) as specified in the root `package.json` file.

Expand Down
6 changes: 3 additions & 3 deletions apps/coordinator/Containerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# syntax=docker/dockerfile:labs

FROM node:20-bookworm-slim@sha256:72f2f046a5f8468db28730b990b37de63ce93fd1a72a40f531d6aa82afdf0d46 AS node-20
FROM node:22.23.1-bookworm-slim@sha256:813a7480f28fdadac1f7f5c824bcdad435b5bc1322a5968bbbdef8d058f9dff4 AS node-22

WORKDIR /app

FROM node-20 AS pruner
FROM node-22 AS pruner

COPY --chown=node:node . .
RUN npx -q turbo@1.10.9 prune --scope=coordinator --docker
RUN find . -name "node_modules" -type d -prune -exec rm -rf '{}' +

FROM node-20 AS base
FROM node-22 AS base

RUN apt-get update \
&& apt-get install -y buildah ca-certificates dumb-init docker.io busybox \
Expand Down
6 changes: 3 additions & 3 deletions apps/docker-provider/Containerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM node:20-alpine@sha256:7a91aa397f2e2dfbfcdad2e2d72599f374e0b0172be1d86eeb73f1d33f36a4b2 AS node-20-alpine
FROM node:22-alpine@sha256:9bef0ef1e268f60627da9ba7d7605e8831d5b56ad07487d24d1aa386336d1944 AS node-22-alpine

WORKDIR /app

FROM node-20-alpine AS pruner
FROM node-22-alpine AS pruner

COPY --chown=node:node . .
RUN npx -q turbo@1.10.9 prune --scope=docker-provider --docker
RUN find . -name "node_modules" -type d -prune -exec rm -rf '{}' +

FROM node-20-alpine AS base
FROM node-22-alpine AS base

RUN apk add --no-cache dumb-init docker

Expand Down
6 changes: 3 additions & 3 deletions apps/kubernetes-provider/Containerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM node:20-alpine@sha256:7a91aa397f2e2dfbfcdad2e2d72599f374e0b0172be1d86eeb73f1d33f36a4b2 AS node-20-alpine
FROM node:22-alpine@sha256:9bef0ef1e268f60627da9ba7d7605e8831d5b56ad07487d24d1aa386336d1944 AS node-22-alpine

WORKDIR /app

FROM node-20-alpine AS pruner
FROM node-22-alpine AS pruner

COPY --chown=node:node . .
RUN npx -q turbo@1.10.9 prune --scope=kubernetes-provider --docker
RUN find . -name "node_modules" -type d -prune -exec rm -rf '{}' +

FROM node-20-alpine AS base
FROM node-22-alpine AS base

RUN apk add --no-cache dumb-init

Expand Down
5 changes: 4 additions & 1 deletion apps/supervisor/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:3030/otel

# Optional settings
DEBUG=1
TRIGGER_DEQUEUE_INTERVAL_MS=1000
TRIGGER_DEQUEUE_INTERVAL_MS=1000

# Dev-only: stream this process's logs over a local telnet/TCP socket (nc localhost 6769). Uncomment to enable.
# SUPERVISOR_TELNET_LOGS_PORT=6769
2 changes: 1 addition & 1 deletion apps/supervisor/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v22.12.0
v22.23.1
3 changes: 3 additions & 0 deletions apps/supervisor/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ export const Env = z
TRIGGER_WORKER_INSTANCE_NAME: z.string().default(randomUUID()),
TRIGGER_WORKER_HEARTBEAT_INTERVAL_SECONDS: z.coerce.number().default(30),

// Opt-in, dev-only: stream this process's logs over a local telnet/TCP socket on this port.
SUPERVISOR_TELNET_LOGS_PORT: z.coerce.number().optional(),

// Required settings
TRIGGER_API_URL: z.string().url(),
TRIGGER_WORKER_TOKEN: z.string(), // accepts file:// path to read from a file
Expand Down
10 changes: 10 additions & 0 deletions apps/supervisor/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { SupervisorSession } from "@trigger.dev/core/v3/workers";
import { SimpleStructuredLogger } from "@trigger.dev/core/v3/utils/structuredLogger";
import { formatLogLine, startTelnetLogServer } from "@trigger.dev/core/v3/telnetLogServer";
import { env } from "./env.js";
import { WorkloadServer } from "./workloadServer/index.js";
import type { WorkloadManagerOptions, WorkloadManager } from "./workloadManager/types.js";
Expand Down Expand Up @@ -749,5 +750,14 @@ class ManagedSupervisor {
}
}

// Opt-in, dev-only: mirror this process's structured logs to a local telnet/TCP stream.
if (env.SUPERVISOR_TELNET_LOGS_PORT && env.SUPERVISOR_TELNET_LOGS_PORT > 0) {
const telnetLogServer = startTelnetLogServer({
port: env.SUPERVISOR_TELNET_LOGS_PORT,
name: "supervisor",
});
SimpleStructuredLogger.onLog = (log) => telnetLogServer.broadcast(formatLogLine(log));
}

const worker = new ManagedSupervisor();
worker.start();
Loading
Loading