chore(webapp,core): remove the end-of-life v3 (engine V1) execution stack#4236
Conversation
…from the v2 engine v3 (engine V1) execution is retired. Reject V1 triggers unconditionally with the upgrade message, finalize a cancelled historical V1 run directly in the DB (no coordinator/devPubSub, never throws so the cancel route cannot 500), reject V1 reschedules, and default a fresh dev environment to V2. Move all live queue reads (concurrency limits, env queue length/size guard, project metrics, admin queue debug) off the MarQS singleton onto the v2 run engine so MarQS can be removed.
v3 (engine V1) is end-of-life. This removes the V1 execution stack while keeping every still-on-v3 request on a graceful 4xx path (never a 5xx): - the MarQS queue and its shared/dev queue consumers - the V1 socket.io namespaces (coordinator, provider, shared-queue) and the V1 attempt, checkpoint, and batch-resume lifecycle services - the graphile-worker / zod-worker background job stack - the DEPRECATE_V3_ENABLED flag (V1 is now rejected unconditionally) and the @trigger.dev/core v3/zodNamespace export Live queue reads (concurrency limits, env queue length, project metrics, admin queue debug) now read from the v2 run engine instead of MarQS. The batchTriggerV3 service and batch-completion worker stay live for current clients. A fresh dev environment now defaults to V2.
Refresh the CLAUDE.md / AGENTS.md / legacy-v3-code rule sections that described the now-deleted V1 files, and drop stale comment references to removed modules.
…env vars After confirming no cross-repo consumers (infra/cloud/compute), remove the now-dead v3 socket message catalogs from @trigger.dev/core (coordinator/provider/shared-queue/ prod-worker + the legacy background-worker websocket catalogs) and the unreferenced MarQS / shared-queue-consumer environment variables from the webapp. Keeps the v4 IPC catalogs, ServerBackgroundWorker, and the still-used CHECKPOINT_THRESHOLD_IN_MS.
🦋 Changeset detectedLatest commit: a065849 The changes in this PR will be included in the next version bump. This PR includes changesets to release 26 packages
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 |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThe change retires the v3 engine execution stack and removes legacy workers, MARQS queue infrastructure, websocket namespaces, Graphile worker integration, and related services. Remaining V1 operations reject with upgrade messaging, while development engine detection defaults to V2. Queue metrics, limits, concurrency updates, batch completion, and deployment flows use RunQueue or the common worker. Retired core exports, websocket schemas, dependencies, and operational documentation are also updated. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
…rovider references
Delete the unit tests for the removed createCheckpoint and cancelDevSessionRuns services, apply formatting, and reword the changeset plus agent-guidance docs to note that a V1 branch may finalize (not only reject) gracefully.
Drop mentions of the removed graphile/zod-worker background system, the deleted zod-worker package, and the v3 coordinator from the repo's CLAUDE.md / AGENTS.md guidance now that v3 execution is gone.
@trigger.dev/build
trigger.dev
@trigger.dev/core
@trigger.dev/python
@trigger.dev/react-hooks
@trigger.dev/redis-worker
@trigger.dev/rsc
@trigger.dev/schema-to-json
@trigger.dev/sdk
commit: |
The global-concurrency admin page was a v3 (MarQS) debug view and was removed with the v3 engine. Remove its admin-nav tab and repoint the two dashboard auth e2e tests (which used it only as a representative super-admin route) to /admin/feature-flags.
…ngine worker The legacy worker was a closed loop: the only enqueuers lived inside completeBatchTaskRunItemV3, whose only caller was the worker's own job handler. Run-engine's batchSystem owns batch completion now, and the synchronous tryCompleteBatchV3 path used by the check-completion route stays.
The engine column still defaults to V1 for historical rows, so a brand-new project was transiently V1 until its first worker registration or deploy upgraded it, and any trigger in that window hit the v3 upgrade error. New projects are V2 up front. The V1 to V2 upgrade guards for existing legacy projects are untouched.
Removes 27 unused production dependencies from the webapp, plus 6 orphaned @types packages and two dead files whose only importers were those packages (SimpleSelect.tsx and ulid.server.ts). seedrandom and semver are among them: they were only used by the v3 code this PR removes. Adds knip as a dev dependency with a knip:deps script and a knip.json config so unused dependencies can be found the same way from now on. knip catches deps reachable only through otherwise-dead code, which a plain grep cannot. non.geist is ignored: it is a font imported for its side effects via tailwind.css.
## Summary 2 new features, 11 improvements, 5 bug fixes. ## Breaking changes - Trigger.dev v3 is no longer supported. For self-hosted deployments, 4.5.0 is the last version we officially support for running v3; stay on 4.5.0 or upgrade to v4. v3 triggers, batch triggers, reschedules, and deploys now return a clear upgrade message instead of running. ([#4236](#4236)) ## Improvements - You can now mark environment variables synced via the `syncEnvVars` build extension as secrets. Return `{ name, value, isSecret: true }` from your callback and those variables are stored redacted in the dashboard, just like manually created secret env vars. ([#4203](#4203)) - Remove the legacy `--mcp` and `--mcp-port` options from the `dev` command. Run the dedicated `trigger mcp` command to start the Trigger.dev MCP server. ([#4246](#4246)) - Removed the unused `ResourceMonitor` export from `@trigger.dev/core/v3/serverOnly`. It was a server-side logging helper with no remaining consumers. ([#4244](#4244)) - Removed the unused `@trigger.dev/core/v3/zodNamespace` export and the legacy v3 socket message schemas. These were only used by the now-retired v3 engine and have no v4 consumers. ([#4236](#4236)) ## Bug fixes - Fix a `chat.agent` message-loss race where sending a message right after an action (such as an undo) could drop the follow-up's response from the UI until a refresh. ([#4234](#4234)) ## Server changes These changes affect the self-hosted Docker image and Trigger.dev Cloud: - Added `EVENT_REPOSITORY_POSTGRES_WRITES_DISABLED` to skip all PostgreSQL task-event writes for deployments that store task events in ClickHouse. Leave it off unless `EVENT_REPOSITORY_DEFAULT_STORE` is `clickhouse_v2`, otherwise task events are lost. ([#4242](#4242)) - Promo credits: a /promo signup landing page, redeeming a promo code when a new org selects a plan, and showing remaining credits on the usage page. ([#4138](#4138)) - Speed up retrieving a background worker by version. The endpoint no longer runs a slow lookup that scanned the full task table for large deployments; it now reuses data it already loads, so the response is the same but returns much faster. ([#4245](#4245)) - Clearer login error when an email address is blocked by the WHITELISTED_EMAILS setting: the message now explains the address isn't allowed on this instance instead of the ambiguous "This email is unauthorized". ([#4220](#4220)) - Make the native build server the default in project build settings. It's now opt-out, stored as a new `disableNativeBuildServer` key. Also clarifies in the UI that build settings apply to GitHub-triggered and native build server deployments. ([#3980](#3980)) - Optionally process high-volume telemetry ingestion in parallel for higher throughput under heavy load by setting `OTEL_TRANSFORM_WORKER_POOL_ENABLED=1`. Off by default. ([#4232](#4232)) - Add a `REALTIME_BACKEND_DEFAULT` env var to choose the default realtime backend (`electric`, `native`, or `shadow`) for environments whose org has no per-org override. Defaults to `electric`, so existing behavior is unchanged. ([#4231](#4231)) - Clarified on the Regions page that a region only affects where your runs execute, not where your data is stored. This shows as a tooltip on the Location column and in the confirmation dialog when you change your default region. ([#4226](#4226)) - Improved the reliability of how run data is read and written. ([#4237](#4237)) - Fixed stale login errors: an error from a previous login attempt (for example a rejected email address) no longer keeps reappearing on the login page and no longer makes later, successful attempts look like they failed. ([#4220](#4220)) - The Errors page now shows better details for each error. Errors that don't carry a message — such as errors thrown without a message, or values thrown that aren't `Error` objects — get a meaningful title instead of all reading "Unknown error", and are grouped by their name (or value) rather than collapsed into a single group. The error type now shows the actual error name, and stack traces now appear where previously they were missing. ([#4225](#4225)) - Return a clear client error when SSO form submissions use an unsupported content type ([#4238](#4238)) - Query page: extracting fields from a run's output with JSON functions (such as JSONExtractString or JSONExtractInt) no longer fails with an "illegal type: JSON" error. ([#4221](#4221)) <details> <summary>Raw changeset output</summary> # Releases ## @trigger.dev/build@4.5.4 ### Patch Changes - You can now mark environment variables synced via the `syncEnvVars` build extension as secrets. Return `{ name, value, isSecret: true }` from your callback and those variables are stored redacted in the dashboard, just like manually created secret env vars. ([#4203](#4203)) - Updated dependencies: - `@trigger.dev/core@4.5.4` ## trigger.dev@4.5.4 ### Patch Changes - Remove the legacy `--mcp` and `--mcp-port` options from the `dev` command. Run the dedicated `trigger mcp` command to start the Trigger.dev MCP server. ([#4246](#4246)) - Updated dependencies: - `@trigger.dev/core@4.5.4` - `@trigger.dev/build@4.5.4` - `@trigger.dev/schema-to-json@4.5.4` ## @trigger.dev/core@4.5.4 ### Patch Changes - Removed the unused `ResourceMonitor` export from `@trigger.dev/core/v3/serverOnly`. It was a server-side logging helper with no remaining consumers. ([#4244](#4244)) - Removed the unused `@trigger.dev/core/v3/zodNamespace` export and the legacy v3 socket message schemas. These were only used by the now-retired v3 engine and have no v4 consumers. ([#4236](#4236)) ## @trigger.dev/python@4.5.4 ### Patch Changes - Updated dependencies: - `@trigger.dev/sdk@4.5.4` - `@trigger.dev/core@4.5.4` - `@trigger.dev/build@4.5.4` ## @trigger.dev/react-hooks@4.5.4 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.5.4` ## @trigger.dev/redis-worker@4.5.4 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.5.4` ## @trigger.dev/rsc@4.5.4 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.5.4` ## @trigger.dev/schema-to-json@4.5.4 ### Patch Changes - Updated dependencies: - `@trigger.dev/core@4.5.4` ## @trigger.dev/sdk@4.5.4 ### Patch Changes - Fix a `chat.agent` message-loss race where sending a message right after an action (such as an undo) could drop the follow-up's response from the UI until a refresh. ([#4234](#4234)) - Updated dependencies: - `@trigger.dev/core@4.5.4` </details> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Summary
v3 (the engine that ran the SDK v3 era, internally
RunEngineVersion.V1) is end-of-life. Following the removal of the v3 execution apps (#4194) and the legacy dev websocket (#4198), this removes the remaining v3 execution stack from the server.Clients still on v3 (an old SDK or CLI that has not upgraded) keep getting a clear "upgrade to v4" response. Triggers, batch triggers, reschedules, and deploys that resolve to v3 are rejected with a graceful 4xx pointing at the migration guide, never a 5xx, so a stale client cannot affect server health. Self-hosted instances still running v3 should stay on the 4.5.x release line until they migrate.
What is removed
@trigger.dev/redis-worker.DEPRECATE_V3_ENABLEDflag: v3 is now rejected unconditionally, so the flag is gone.@trigger.dev/core(thev3/zodNamespacesubpath and the legacy socket message catalogs) and the now-dead MarQS environment variables.What stays
The v4 engine is untouched. The graceful v3 rejection boundary stays,
determineEngineVersionstill detects a v3 project so it can reject it, and the batch service plus batch-completion worker stay for current clients. Live queue concurrency limits and metrics now read from the v4 run engine instead of MarQS, and a brand-new dev environment now defaults to v4.Dependency cleanup
Removes webapp dependencies left unused by this change:
seedrandomandsemver(only the removed v3 code used them) plus a set that was already dead, their orphaned@typespackages, and two dead files. Adds aknip:depsscript and aknip.jsonconfig so unused dependencies can be found the same way going forward.