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
7 changes: 1 addition & 6 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.2.0/schema.json",
"changelog": [
"@remix-run/changelog-github",
{
"repo": "BasicBlock/trigger.dev"
}
],
"changelog": false,
"commit": false,
"fixed": [["@basicblock/trigger-*"]],
"linked": [],
Expand Down
2 changes: 2 additions & 0 deletions apps/supervisor/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ const Env = z.object({
TRIGGER_WORKLOAD_API_HOST_INTERNAL: z.string().default("0.0.0.0"),
TRIGGER_WORKLOAD_API_PORT_INTERNAL: z.coerce.number().default(8020), // This is the port the workload API listens on
TRIGGER_WORKLOAD_API_PORT_EXTERNAL: z.coerce.number().default(8020), // This is the exposed port passed to the run controller
TRIGGER_WORKLOAD_API_WS_PING_INTERVAL_MS: z.coerce.number().int().positive().default(25000),
TRIGGER_WORKLOAD_API_WS_PING_TIMEOUT_MS: z.coerce.number().int().positive().default(120000),

// Runner settings
RUNNER_HEARTBEAT_INTERVAL_SECONDS: z.coerce.number().optional(),
Expand Down
5 changes: 4 additions & 1 deletion apps/supervisor/src/workloadServer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,10 @@ export class WorkloadServer extends EventEmitter<WorkloadServerEvents> {
}

private createWebsocketServer() {
const io = new Server(this.httpServer.server);
const io = new Server(this.httpServer.server, {
pingInterval: env.TRIGGER_WORKLOAD_API_WS_PING_INTERVAL_MS,
pingTimeout: env.TRIGGER_WORKLOAD_API_WS_PING_TIMEOUT_MS,
});

const websocketServer: Namespace<
WorkloadClientToServerEvents,
Expand Down
4 changes: 2 additions & 2 deletions packages/build/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@basicblock/trigger-build",
"version": "4.3.4",
"version": "4.3.5",
"description": "trigger.dev build extensions",
"license": "MIT",
"publishConfig": {
Expand Down Expand Up @@ -79,7 +79,7 @@
},
"dependencies": {
"@prisma/config": "^6.10.0",
"@basicblock/trigger-core": "workspace:4.3.4",
"@basicblock/trigger-core": "workspace:4.3.5",
"mlly": "^1.7.1",
"pkg-types": "^1.1.3",
"resolve": "^1.22.8",
Expand Down
8 changes: 4 additions & 4 deletions packages/cli-v3/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@basicblock/trigger-cli",
"version": "4.3.4",
"version": "4.3.5",
"description": "A Command-Line Interface for Trigger.dev projects",
"type": "module",
"license": "MIT",
Expand Down Expand Up @@ -94,9 +94,9 @@
"@opentelemetry/sdk-trace-node": "2.0.1",
"@opentelemetry/semantic-conventions": "1.36.0",
"@s2-dev/streamstore": "^0.17.6",
"@basicblock/trigger-build": "workspace:4.3.4",
"@basicblock/trigger-core": "workspace:4.3.4",
"@basicblock/trigger-schema-to-json": "workspace:4.3.4",
"@basicblock/trigger-build": "workspace:4.3.5",
"@basicblock/trigger-core": "workspace:4.3.5",
"@basicblock/trigger-schema-to-json": "workspace:4.3.5",
"ansi-escapes": "^7.0.0",
"braces": "^3.0.3",
"c12": "^1.11.1",
Expand Down
13 changes: 13 additions & 0 deletions packages/cli-v3/src/entryPoints/managed/execution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,15 @@ export class RunExecution {
// Short delay to give websocket time to reconnect
await sleep(100);

// Reset the supervisor socket after checkpoint restore.
// Socket transports don't reliably survive process snapshot/restore boundaries.
try {
this.supervisorSocket.disconnect();
} catch (_) {
// noop
}
this.supervisorSocket.connect();

// Process any env overrides
await this.processEnvOverrides("restore");

Expand Down Expand Up @@ -1204,6 +1213,10 @@ export class RunExecution {
}

this.sendDebugLog("suspending, any day now 🚬", { suspendableSnapshot });

// Disconnect before snapshotting so the restored process does a fresh socket handshake.
// This avoids carrying a stale websocket transport through checkpoint/restore.
this.supervisorSocket.disconnect();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@basicblock/trigger-core",
"version": "4.3.4",
"version": "4.3.5",
"description": "Core code used across the Trigger.dev SDK and platform",
"license": "MIT",
"publishConfig": {
Expand Down
12 changes: 6 additions & 6 deletions packages/python/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@basicblock/trigger-python",
"version": "4.3.4",
"version": "4.3.5",
"description": "Python runtime and build extension for Trigger.dev",
"license": "MIT",
"publishConfig": {
Expand Down Expand Up @@ -46,7 +46,7 @@
"check-exports": "attw --pack ."
},
"dependencies": {
"@basicblock/trigger-core": "workspace:4.3.4",
"@basicblock/trigger-core": "workspace:4.3.5",
"tinyexec": "^0.3.2"
},
"devDependencies": {
Expand All @@ -57,12 +57,12 @@
"tsx": "4.17.0",
"esbuild": "^0.23.0",
"@arethetypeswrong/cli": "^0.15.4",
"@basicblock/trigger-build": "workspace:4.3.4",
"@basicblock/trigger-sdk": "workspace:4.3.4"
"@basicblock/trigger-build": "workspace:4.3.5",
"@basicblock/trigger-sdk": "workspace:4.3.5"
},
"peerDependencies": {
"@basicblock/trigger-sdk": "workspace:^4.3.4",
"@basicblock/trigger-build": "workspace:^4.3.4"
"@basicblock/trigger-sdk": "workspace:^4.3.5",
"@basicblock/trigger-build": "workspace:^4.3.5"
},
"engines": {
"node": ">=18.20.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/react-hooks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@basicblock/trigger-react-hooks",
"version": "4.3.4",
"version": "4.3.5",
"description": "trigger.dev react hooks",
"license": "MIT",
"publishConfig": {
Expand Down Expand Up @@ -38,7 +38,7 @@
"check-exports": "attw --pack ."
},
"dependencies": {
"@basicblock/trigger-core": "workspace:^4.3.4",
"@basicblock/trigger-core": "workspace:^4.3.5",
"swr": "^2.2.5"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/redis-worker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@basicblock/trigger-redis-worker",
"version": "4.3.4",
"version": "4.3.5",
"description": "Redis worker for trigger.dev",
"license": "MIT",
"publishConfig": {
Expand All @@ -24,7 +24,7 @@
"test": "vitest --sequence.concurrent=false --no-file-parallelism"
},
"dependencies": {
"@basicblock/trigger-core": "workspace:4.3.4",
"@basicblock/trigger-core": "workspace:4.3.5",
"lodash.omit": "^4.5.0",
"nanoid": "^5.0.7",
"p-limit": "^6.2.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/rsc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@basicblock/trigger-rsc",
"version": "4.3.4",
"version": "4.3.5",
"description": "trigger.dev rsc",
"license": "MIT",
"publishConfig": {
Expand Down Expand Up @@ -38,14 +38,14 @@
"check-exports": "attw --pack ."
},
"dependencies": {
"@basicblock/trigger-core": "workspace:^4.3.4",
"@basicblock/trigger-core": "workspace:^4.3.5",
"mlly": "^1.7.1",
"react": "19.0.0-rc.1",
"react-dom": "19.0.0-rc.1"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.4",
"@basicblock/trigger-build": "workspace:^4.3.4",
"@basicblock/trigger-build": "workspace:^4.3.5",
"@types/node": "^20.14.14",
"@types/react": "*",
"@types/react-dom": "*",
Expand Down
2 changes: 1 addition & 1 deletion packages/schema-to-json/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@basicblock/trigger-schema-to-json",
"version": "4.3.4",
"version": "4.3.5",
"description": "Convert various schema validation libraries to JSON Schema",
"license": "MIT",
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/trigger-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@basicblock/trigger-sdk",
"version": "4.3.4",
"version": "4.3.5",
"description": "trigger.dev Node.JS SDK",
"license": "MIT",
"publishConfig": {
Expand Down Expand Up @@ -53,7 +53,7 @@
"dependencies": {
"@opentelemetry/api": "1.9.0",
"@opentelemetry/semantic-conventions": "1.36.0",
"@basicblock/trigger-core": "workspace:4.3.4",
"@basicblock/trigger-core": "workspace:4.3.5",
"chalk": "^5.2.0",
"cronstrue": "^2.21.0",
"debug": "^4.3.4",
Expand Down
24 changes: 12 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions scripts/publish-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set -euo pipefail

token="${NODE_AUTH_TOKEN:-${GITHUB_TOKEN:-${GH_TOKEN:-}}}"

if [[ -z "$token" ]] && command -v gh >/dev/null 2>&1; then
token="$(gh auth token 2>/dev/null || true)"
fi

if [[ -z "$token" ]]; then
echo "Missing auth token. Set NODE_AUTH_TOKEN, GITHUB_TOKEN, or GH_TOKEN."
exit 1
Expand Down
Loading