Skip to content

trigger.dev v4.7.5

Choose a tag to compare

@github-actions github-actions released this 20 Oct 11:10
· 26 commits to main since this release
3349df0

Upgrade

npx trigger.dev@latest update  # npm
pnpm dlx trigger.dev@latest update  # pnpm
yarn dlx trigger.dev@latest update  # yarn
bunx trigger.dev@latest update  # bun

Self-hosted Docker image: ghcr.io/triggerdotdev/trigger.dev:v4.7.5

Release notes

Read the full release notes: https://trigger.dev/changelog/v4-7-5

What's changed

Improvements

  • Add trigger.dev tasks trigger <task id> to trigger a task from your terminal. It uses the dev environment unless you pass --env, and --wait waits for the run and prints its output or error, exiting with code 1 if it failed. The runs commands now use the same dev branch as trigger dev when you pass --env dev. (d5dc48424)

    npx trigger.dev@latest tasks trigger hello-world --payload '{"name":"Ada"}' --wait
  • Manage custom metric dashboards from code. query.dashboards lists, creates, updates and deletes custom dashboards and their widgets, and every widget query is checked when it is saved. The MCP server adds create_dashboard and set_dashboard_widgets, so your AI assistant can build a dashboard for you. (252624c92)

    import { query } from "@trigger.dev/sdk";
    
    await query.dashboards.create({
      title: "Email tasks",
      widgets: [
        {
          title: "Total runs",
          query: "SELECT count() AS total FROM runs",
          display: { type: "bignumber", column: "total", aggregation: "sum" },
        },
      ],
      });
  • trigger deploy and trigger promote now say which environment they're targeting, and accept --prod as a shorthand for --env prod. When TRIGGER_ACCESS_TOKEN holds an environment API key and you don't pass --env, they now use that key's environment instead of assuming prod. Passing an --env that doesn't match the key is now an error, where before the deploy went to the key's environment. (70ea83d38)

    Preview deploys now detect the branch on CI providers that check out a detached HEAD, such as GitLab, Bitbucket, CircleCI, Buildkite, Travis CI, Jenkins and Azure Pipelines, instead of creating a branch called HEAD. Test links printed after a preview deploy now open the preview branch you deployed instead of staging.

    The MCP deploy tool no longer defaults to prod, so your AI assistant has to choose the environment.

  • trigger dev works better when a coding agent like Claude Code, Cursor or Codex runs it: it skips the install prompts, lists the tasks it registered, and prints each run's dashboard URL and output. For everyone, a failed build now ends with a line saying it will rebuild when you fix the errors, and retried attempts and crashed task processes now show their errors. (d5dc48424)

  • Redact span content before it leaves the worker. telemetry.spanProcessors in trigger.config.ts runs your own span processors ahead of every export, to Trigger.dev and to your own exporters, so you can redact or drop span content before it reaches the run trace. chat.agent also takes a telemetry option to stop recording the user's message and clientData on its spans. (32b36b143)

    export default defineConfig({
      telemetry: { spanProcessors: [new MyRedactingSpanProcessor()] },
    });
    
    chat.agent({
      id: "my-chat",
      telemetry: { recordUserMessage: false, recordClientData: false },
      run: async ({ messages, signal, streamText }) =>
        streamText({ model, messages, abortSignal: signal }),
      });

Bug fixes

  • Fix run subscriptions crashing Node with Controller is already closed after you break out of the loop, and stop polling once you do. ApiClient subscribe methods also accept a custom fetchClient. (9f4295bff)

Other changes

  • Update the @modelcontextprotocol/sdk dependency to ^1.31.0. (b5354d188)

Server changes

These changes affect the self-hosted Docker image and Trigger.dev Cloud:

  • Recent deployments made with --local-bundle can now be redeployed from the deployments list, rebuilding the same bundle with its build-time environment variables.
  • The API keys page now prompts you to create your first key instead of showing an empty table.
  • The short link /_/billing now takes you straight to the billing page of your current organization.
  • A batchTriggerAndWait could stay stuck executing after all of its child runs finished, if creating the batch was retried while the server was slow to respond. The parent now resumes with its child runs' results.
  • The natural-language field on the schedule form returns a cron expression again instead of an error.
  • Fixed runs failing to resume from a wait when the platform had already resumed them but the confirmation was lost.
  • Run traces returned by the API no longer include internal debug events.
  • Fixed natural-language schedule generation in the schedule side panel.
  • A run whose process is killed is now only reported as out of memory when the machine actually ran out of memory. Any other kill (e.g. the machine being shut down or reclaimed) fails the attempt straight away as a crash, which is retried using your task's retry settings on the same machine size.

All packages: v4.7.5

@trigger.dev/build, @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, trigger.dev

Contributors

Eric Allam, triggerdotdev-the-inspector[bot], @isshaddad, @nicktrn, Chris Arderne, Wes Mason, João Dias, github-actions[bot], Katia Bulatova, @d-cs, @D-K-P, mintlify[bot], claude[bot], Oskar Otwinowski, Saadi Myftija, @jack, @Mariefay

Full changelog: v4.7.4...v4.7.5