Skip to content

chore: Update version for release #1269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 16, 2024
Merged

chore: Update version for release #1269

merged 1 commit into from
Sep 16, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 23, 2024

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@trigger.dev/[email protected]

Major Changes

Patch Changes

[email protected]

Major Changes

Patch Changes

  • b8477ea: Fixes an issue with scoped packages in additionalPackages option

  • ed2a26c: - Fix additionalFiles that aren't decendants

    • Stop swallowing uncaught exceptions in prod
    • Improve warnings and errors, fail early on critical warnings
    • New arg to --save-logs even for successful builds
  • 9971de6: Increase span attribute value length limit to 2048

  • d4ccdf7: Add an e2e suite to test compiling with v3 CLI.

  • b207601: v3 CLI update command and package manager detection fix

  • 43bc7ed: Hoist uncaughtException handler to the top of workers to better report error messages

  • c702d6a: better handle task metadata parse errors, and display nicely formatted errors

  • c11a77f: cli v3: increase otel force flush timeout to 30s from 500ms

  • 5b745dc: Vastly improved dev command output

  • b66d552: add machine config and secure zod connection

  • 9491a16: Implement task.onSuccess/onFailure and config.onSuccess/onFailure

  • 1670c4c: Remove "log" Log Level, unify log and info messages under the "info" log level

  • 5a6e79e: Fixing missing logs when importing client @opentelemetry/api

  • b271742: Configurable log levels in the config file and via env var

  • 279717b: Don’t swallow some error messages when deploying

  • dbda820: - Prevent uncaught exceptions when handling WebSocket messages

    • Improve CLI dev command WebSocket debug and error logging
  • 8578c9b: Fixed empty env vars overriding in dev runs

  • 4986bfd: Add option to print console logs in the dev CLI locally (issue [TRI-2206] Dev option so logs come through to the local console (v3) #1014)

  • e667028: Strip out server-only package from worker builds

  • b68012f: Remove the env var check during deploy (too many false negatives)

  • f9ec66c: New Build System

  • f96f1e9: Better handle issues with resolving dependency versions during deploy

  • 374b6b9: Increase dev worker timeout

  • 624ddce: Fix permissions inside node_modules

  • c270780: Improve prisma errors for missing postinstall

  • 3a1b0c4: v3: Environment variable management API and SDK, along with resolveEnvVars CLI hook

  • c75e29a: Add sox and audiowaveform binaries to worker images

  • d6c6dc9: try/catch opening the login URL

  • c1d4c04: Fix automatic opening of login URL on linux-server systems with missing xdg-open

  • a86f36c: Fix TypeScript inclusion in tsconfig.json for cli-v3 init

  • 1b90ffb: v3: Usage tracking

  • 5cf90da: Fix issues that could result in unreezable state run crashes. Details:

    • Never checkpoint between attempts
    • Some messages and socket data now include attempt numbers
    • Remove attempt completion replays
    • Additional prod entry point logging
    • Fail runs that receive deprecated (pre-lazy attempt) execute messages
  • 7ea8532: Display errors for runs and deployments

  • 63a643b: v3: fix digest extraction

  • d9c9e80: Changed "Worker" to "Version" in the dev command key

  • 1207efb: Correctly handle self-hosted deploy command errors

  • 83dc871: Fix issues with consecutive waits

  • 2156e15: Adding some additional telemetry during deploy to help debug issues

  • 16ad595: v3: update @depot/cli to latest 0.0.1-cli.2.71.0

  • e35f297: Default to retrying enabled in dev when running init

  • ae9a8b0: Automatically bundle internal packages that use file, link or workspace protocl

  • e3cf456: Handle string and non-stringifiable outputs like functions

  • f040417: Fix entry point paths on windows

  • 8c4df32: Improve error messages during dev/deploy and handle deploy image build issues

  • 14c2bdf: Tasks should now be much more robust and resilient to reconnects during crucial operations and other failure scenarios.

    Task runs now have to signal checkpointable state prior to ALL checkpoints. This ensures flushing always happens.

    All important socket.io RPCs will now be retried with backoff. Actions relying on checkpoints will be replayed if we haven't been checkpointed and restored as expected, e.g. after reconnect.

    Other changes:

    • Fix retry check in shared queue
    • Fix env var sync spinner
    • Heartbeat between retries
    • Fix retry prep
    • Fix prod worker no tasks detection
    • Fail runs above MAX_TASK_RUN_ATTEMPTS
    • Additional debug logs in all places
    • Prevent crashes due to failed socket schema parsing
    • Remove core-apps barrel
    • Upgrade socket.io-client to fix an ACK memleak
    • Additional index failure logs
    • Prevent message loss during reconnect
    • Prevent burst of heartbeats on reconnect
    • Prevent crash on failed cleanup
    • Handle at-least-once lazy execute message delivery
    • Handle uncaught entry point exceptions
  • 9491a16: Adds support for emitDecoratorMetadata: true and experimentalDecorators: true in your tsconfig using the @anatine/esbuild-decorators package. This allows you to use libraries like TypeORM:

    import "reflect-metadata";
    import { DataSource } from "typeorm";
    import { Entity, Column, PrimaryColumn } from "typeorm";
    
    @Entity()
    export class Photo {
      @PrimaryColumn()
      id!: number;
    
      @Column()
      name!: string;
    
      @Column()
      description!: string;
    
      @Column()
      filename!: string;
    
      @Column()
      views!: number;
    
      @Column()
      isPublished!: boolean;
    }
    
    export const AppDataSource = new DataSource({
      type: "postgres",
      host: "localhost",
      port: 5432,
      username: "postgres",
      password: "postgres",
      database: "v3-catalog",
      entities: [Photo],
      synchronize: true,
      logging: false,
    });

    And then in your trigger.config.ts file you can initialize the datasource using the new init option:

    import type { TriggerConfig } from "@trigger.dev/sdk/v3";
    import { AppDataSource } from "@/trigger/orm";
    
    export const config: TriggerConfig = {
      // ... other options here
      init: async (payload, { ctx }) => {
        await AppDataSource.initialize();
      },
    };

    Now you are ready to use this in your tasks:

    import { task } from "@trigger.dev/sdk/v3";
    import { AppDataSource, Photo } from "./orm";
    
    export const taskThatUsesDecorators = task({
      id: "taskThatUsesDecorators",
      run: async (payload: { message: string }) => {
        console.log("Creating a photo...");
    
        const photo = new Photo();
        photo.id = 2;
        photo.name = "Me and Bears";
        photo.description = "I am near polar bears";
        photo.filename = "photo-with-bears.jpg";
        photo.views = 1;
        photo.isPublished = true;
    
        await AppDataSource.manager.save(photo);
      },
    });
  • 8578c9b: Support self-hosters pushing to a custom registry when running deploy

  • b68012f: Fixes an issue that was treating v2 trigger directories as v3

  • e417aca: Added config option extraCACerts to ProjectConfig type. This copies the ca file along with additionalFiles and sets NODE_EXTRA_CA_CERTS environment variable in built image as well as running the task.

  • 568da01: - Improve non-zero exit code error messages

    • Detect OOM conditions within worker child processes
    • Internal errors can have optional stack traces
    • Docker provider can be set to enforce machine presets
  • 0e919f5: Better handle uncaught exceptions

  • cf13fbd: Add --runtime option to the init CLI command

  • b271742: Added a Node.js runtime check for the CLI

  • cf13fbd: trigger.dev init now adds @trigger.dev/build to devDependencies

  • 01633c9: Output stderr logs on dev worker failure

  • f2894c1: Fix post start hooks

  • 52b6f48: Add e2e fixtures corresponding to past issues
    Implement e2e suite parallelism
    Enhance log level for specific e2e suite messages

  • de1cc86: Fix dev CLI output when not printing update messages

  • 328947d: Use the dashboard url instead of the API url for the View logs link

  • ebeb790: Add typescript as a dependency so the esbuild-decorator will work even when running in npx

  • 5ae3da6: Await file watcher cleanup in dev

  • e337b21: Add a postInstall option to allow running scripts after dependencies have been installed in deployed images

  • 1c24348: Add openssl to prod worker image and allow passing auth token via env var for deploy

  • 719c0a0: Fixed incorrect span timings around checkpoints by implementing a precise wall clock that resets after restores

  • 74d1e61: Fix a bug where revoking the CLI token would prevent you from ever logging in again with the CLI.

  • 52b2a82: Add git to prod worker image which fixes private package installs

  • 4986bfd: Adding task with a triggerSource of schedule

  • 8578c9b: Fix --project-ref when running deploy

  • 68d3242: Capture and display stderr on index failures

  • e9a63a4: Lock SDK and CLI deps on exact core version

  • 8757fdc: v3: [prod] force flush timeout should be 1s

  • 2609389: When using idempotency keys, triggerAndWait and batchTriggerAndWait will still work even if the existing runs have already been completed (or even partially completed, in the case of batchTriggerAndWait)

    • TaskRunExecutionResult.id is now the run friendlyId, not the attempt friendlyId
    • A single TaskRun can now have many batchItems, in the case of batchTriggerAndWait while using idempotency keys
    • A run’s idempotencyKey is now added to the ctx as well as the TaskEvent and displayed in the span view
    • When resolving batchTriggerAndWait, the runtimes no longer reject promises, leading to an error in the parent task
  • 49184c7: Update trigger.dev CLI for new batch otel support

  • b82db67: Add additional logging around cleaning up dev workers, and always kill them after 5 seconds if they haven't already exited

  • f565829: v3: Copy over more of the project's package.json keys into the deployed package.json (support for custom config like zenstack)

  • d3a18fb: Fix package builds and CLI commands on Windows

  • 77ad412: Improved ESM module require error detection logic

  • 98ef170: Set the deploy timeout to 3mins from 1min

  • b68012f: Move to our global system from AsyncLocalStorage for the current task context storage

  • 098932e: v3: vercel edge runtime support

  • f040417: Support custom config file names & paths

  • 8694e57: Fix CLI logout and add list-profiles command

  • 9835f4e: v3: fix otel flushing causing CLEANUP ack timeout errors by always setting a forceFlushTimeoutMillis value

  • d0d3a64: - Prevent downgrades during update check and advise to upgrade CLI

    • Detect bun and use npm instead
    • During init, fail early and advise if not a TypeScript project
    • During init, allow specifying custom package manager args
    • Add links to dev worker started message
    • Fix links in unsupported terminals
  • 6dcfead: Fixing an issue with bundling @trigger.dev/core/v3 in dev when using pnpm

  • 35dbaed: - Fix init command SDK pinning

    • Show --api-url / -a flag where needed
    • CLI now also respects TRIGGER_TELEMETRY_DISABLED
    • Dedicated docker checkpoint test function
  • a50063c: Always insert the dirs option when initializing a new project in the trigger.config.ts

  • 9bcb8cb: Added DEBUG to the ignored env vars

  • e02320f: fix: allow command login to read api url from cli args

  • 8578c9b: Fixed stuck runs when a child run fails with a process exit

  • f1571cb: Fixed an issue where the trigger.dev package was not being built before publishing to npm

  • f93eae3: Dynamically import superjson and fix some bundling issues

  • 5ae3da6: - Fix artifact detection logs

    • Fix OOM detection and error messages
    • Add test link to cli deployment completion
  • 75ec4ac: v3: postInstall config option now replaces the postinstall script found in package.json

  • 9be1557: Changed the binary name from trigger.dev to triggerdev to fix a Windows issue

  • c37c822: Use locked package versions when resolving dependencies in deployed workers

  • 7a9bd18: Stop swallowing deployment errors and display them better

  • 6406924: Ensure @trigger.dev/sdk and @trigger.dev/core are always in the list of deployed dependencies

  • 598906f: Fix for typo in v3 CLI login command

  • d3a18fb: Init command was failing on Windows because of bad template paths

  • 62c9a5b: Fixes an issue that caused failed tasks when resuming after calling triggerAndWait or batchTriggerAndWait in prod/staging (this doesn't effect dev).

    The version of Node.js we use for deployed workers (latest 20) would crash with an out-of-memory error when the checkpoint was restored. This crash does not happen on Node 18x or Node21x, so we've decided to upgrade the worker version to Node.js21x, to mitigate this issue.

    You'll need to re-deploy to production to fix the issue.

  • 392453e: Fix for when a log flush times out and the process is checkpointed

  • 8578c9b: Add remote forced externals system, in case we come across another package that cannot be bundled (spurred on by header-generator)

  • 584c7da: - Add graceful exit for prod workers

    • Prevent overflow in long waits
  • 4986bfd: Added a new global - Task Catalog - to better handle task metadata

  • e69ffd3: - Clear paused states before retry

    • Detect and handle unrecoverable worker errors
    • Remove checkpoints after successful push
    • Permanently switch to DO hosted busybox image
    • Fix IPC timeout issue, or at least handle it more gracefully
    • Handle checkpoint failures
    • Basic chaos monkey for checkpoint testing
    • Stack traces are back in the dashboard
    • Display final errors on root span
  • b68012f: Extracting out all the non-SDK related features from the main @trigger.dev/core/v3 export

  • b68012f: Add support for tasks located in subdirectories inside trigger dirs

  • c7a5580: Fix jsonc-parser import

  • c092c0f: v3: Prevent legacy-peer-deps=true from breaking deploys

    When a global .npmrc file includes legacy-peer-deps=true, deploys would fail on the npm ci step because the package-lock.json wouldn't match the package.json file. This is because inside the image build, the .npmrc file would not be picked up and so legacy-peer-deps would end up being false (which is the default). This change forces the package-lock.json file to be created using legacy-peer-deps=false

  • 8578c9b: Only import import-in-the-middle hook if there are instrumented packages

  • f040417: Support for custom conditions

  • 6e65591: Fix various e2e issues for 'resolve-legacy-peer-deps' fixture, installation of fixture deps and lockfile-based test skipping'

  • 8e5ef17: Increase cleanup IPC timeout

  • Updated dependencies [ed2a26c]

  • Updated dependencies [c702d6a]

  • Updated dependencies [9882d66]

  • Updated dependencies [b66d552]

  • Updated dependencies [e3db257]

  • Updated dependencies [9491a16]

  • Updated dependencies [1670c4c]

  • Updated dependencies [b271742]

  • Updated dependencies [cf13fbd]

  • Updated dependencies [dbda820]

  • Updated dependencies [4986bfd]

  • Updated dependencies [eb60126]

  • Updated dependencies [f9ec66c]

  • Updated dependencies [f7d32b8]

  • Updated dependencies [09413a6]

  • Updated dependencies [3a1b0c4]

  • Updated dependencies [8c690a9]

  • Updated dependencies [8578c9b]

  • Updated dependencies [203e002]

  • Updated dependencies [b4f9b70]

  • Updated dependencies [1b90ffb]

  • Updated dependencies [5cf90da]

  • Updated dependencies [cf13fbd]

  • Updated dependencies [9af2570]

  • Updated dependencies [7ea8532]

  • Updated dependencies [1477a2e]

  • Updated dependencies [4f95c9d]

  • Updated dependencies [83dc871]

  • Updated dependencies [d490bc5]

  • Updated dependencies [e3cf456]

  • Updated dependencies [14c2bdf]

  • Updated dependencies [9491a16]

  • Updated dependencies [0ed93a7]

  • Updated dependencies [8578c9b]

  • Updated dependencies [0e77e7e]

  • Updated dependencies [e417aca]

  • Updated dependencies [568da01]

  • Updated dependencies [c738ef3]

  • Updated dependencies [ece6ca6]

  • Updated dependencies [f854cb9]

  • Updated dependencies [0e919f5]

  • Updated dependencies [44e1b87]

  • Updated dependencies [5526465]

  • Updated dependencies [6d9dfbc]

  • Updated dependencies [8578c9b]

  • Updated dependencies [e337b21]

  • Updated dependencies [719c0a0]

  • Updated dependencies [4986bfd]

  • Updated dependencies [e30beb7]

  • Updated dependencies [68d3242]

  • Updated dependencies [374edef]

  • Updated dependencies [e04d448]

  • Updated dependencies [2609389]

  • Updated dependencies [55d1f8c]

  • Updated dependencies [c405ae7]

  • Updated dependencies [9e53829]

  • Updated dependencies [b68012f]

  • Updated dependencies [098932e]

  • Updated dependencies [68d3242]

  • Updated dependencies [9835f4e]

  • Updated dependencies [3f8b6d8]

  • Updated dependencies [fde939a]

  • Updated dependencies [1281d40]

  • Updated dependencies [ba71f95]

  • Updated dependencies [395abe1]

  • Updated dependencies [03b104a]

  • Updated dependencies [f93eae3]

  • Updated dependencies [5ae3da6]

  • Updated dependencies [c405ae7]

  • Updated dependencies [34ca766]

  • Updated dependencies [cf13fbd]

  • Updated dependencies [8ba9987]

  • Updated dependencies [62c9a5b]

  • Updated dependencies [392453e]

  • Updated dependencies [8578c9b]

  • Updated dependencies [6a379e4]

  • Updated dependencies [f854cb9]

  • Updated dependencies [584c7da]

  • Updated dependencies [4986bfd]

  • Updated dependencies [e69ffd3]

  • Updated dependencies [b68012f]

  • Updated dependencies [39885a4]

  • Updated dependencies [8578c9b]

  • Updated dependencies [f9ec66c]

  • Updated dependencies [e69ffd3]

  • Updated dependencies [8578c9b]

  • Updated dependencies [f040417]

  • Updated dependencies [d934feb]

@trigger.dev/[email protected]

Major Changes

Patch Changes

  • ed2a26c: - Fix additionalFiles that aren't decendants

    • Stop swallowing uncaught exceptions in prod
    • Improve warnings and errors, fail early on critical warnings
    • New arg to --save-logs even for successful builds
  • c702d6a: better handle task metadata parse errors, and display nicely formatted errors

  • 9882d66: Pre-pull deployment images for faster startups

  • b66d552: add machine config and secure zod connection

  • e3db257: Fix error stack traces

  • 9491a16: Implement task.onSuccess/onFailure and config.onSuccess/onFailure

  • 1670c4c: Remove "log" Log Level, unify log and info messages under the "info" log level

  • b271742: Configurable log levels in the config file and via env var

  • dbda820: - Prevent uncaught exceptions when handling WebSocket messages

    • Improve CLI dev command WebSocket debug and error logging
  • 4986bfd: Add option to print console logs in the dev CLI locally (issue [TRI-2206] Dev option so logs come through to the local console (v3) #1014)

  • eb60126: Fixed batch otel flushing

  • f9ec66c: New Build System

  • f7d32b8: Removed the folder/filepath from Attempt spans

  • 09413a6: Added version to ctx.run

  • 3a1b0c4: v3: Environment variable management API and SDK, along with resolveEnvVars CLI hook

  • 203e002: Add runs.retrieve management API method to get info about a run by run ID

  • b4f9b70: Support triggering tasks with non-URL friendly characters in the ID

  • 1b90ffb: v3: Usage tracking

  • 5cf90da: Fix issues that could result in unreezable state run crashes. Details:

    • Never checkpoint between attempts
    • Some messages and socket data now include attempt numbers
    • Remove attempt completion replays
    • Additional prod entry point logging
    • Fail runs that receive deprecated (pre-lazy attempt) execute messages
  • 9af2570: Retry 429, 500, and connection error API requests to the trigger.dev server

  • 7ea8532: Display errors for runs and deployments

  • 1477a2e: Increased the timeout when canceling a checkpoint to 31s (to match the timeout on the server)

  • 4f95c9d: v3: recover from server rate limiting errors in a more reliable way

  • 83dc871: Fix issues with consecutive waits

  • d490bc5: Add the "log" level back in as an alias to "info"

  • e3cf456: Handle string and non-stringifiable outputs like functions

  • 14c2bdf: Tasks should now be much more robust and resilient to reconnects during crucial operations and other failure scenarios.

    Task runs now have to signal checkpointable state prior to ALL checkpoints. This ensures flushing always happens.

    All important socket.io RPCs will now be retried with backoff. Actions relying on checkpoints will be replayed if we haven't been checkpointed and restored as expected, e.g. after reconnect.

    Other changes:

    • Fix retry check in shared queue
    • Fix env var sync spinner
    • Heartbeat between retries
    • Fix retry prep
    • Fix prod worker no tasks detection
    • Fail runs above MAX_TASK_RUN_ATTEMPTS
    • Additional debug logs in all places
    • Prevent crashes due to failed socket schema parsing
    • Remove core-apps barrel
    • Upgrade socket.io-client to fix an ACK memleak
    • Additional index failure logs
    • Prevent message loss during reconnect
    • Prevent burst of heartbeats on reconnect
    • Prevent crash on failed cleanup
    • Handle at-least-once lazy execute message delivery
    • Handle uncaught entry point exceptions
  • 9491a16: Adds support for emitDecoratorMetadata: true and experimentalDecorators: true in your tsconfig using the @anatine/esbuild-decorators package. This allows you to use libraries like TypeORM:

    import "reflect-metadata";
    import { DataSource } from "typeorm";
    import { Entity, Column, PrimaryColumn } from "typeorm";
    
    @Entity()
    export class Photo {
      @PrimaryColumn()
      id!: number;
    
      @Column()
      name!: string;
    
      @Column()
      description!: string;
    
      @Column()
      filename!: string;
    
      @Column()
      views!: number;
    
      @Column()
      isPublished!: boolean;
    }
    
    export const AppDataSource = new DataSource({
      type: "postgres",
      host: "localhost",
      port: 5432,
      username: "postgres",
      password: "postgres",
      database: "v3-catalog",
      entities: [Photo],
      synchronize: true,
      logging: false,
    });

    And then in your trigger.config.ts file you can initialize the datasource using the new init option:

    import type { TriggerConfig } from "@trigger.dev/sdk/v3";
    import { AppDataSource } from "@/trigger/orm";
    
    export const config: TriggerConfig = {
      // ... other options here
      init: async (payload, { ctx }) => {
        await AppDataSource.initialize();
      },
    };

    Now you are ready to use this in your tasks:

    import { task } from "@trigger.dev/sdk/v3";
    import { AppDataSource, Photo } from "./orm";
    
    export const taskThatUsesDecorators = task({
      id: "taskThatUsesDecorators",
      run: async (payload: { message: string }) => {
        console.log("Creating a photo...");
    
        const photo = new Photo();
        photo.id = 2;
        photo.name = "Me and Bears";
        photo.description = "I am near polar bears";
        photo.filename = "photo-with-bears.jpg";
        photo.views = 1;
        photo.isPublished = true;
    
        await AppDataSource.manager.save(photo);
      },
    });
  • 0ed93a7: v3: Remove aggressive otel flush timeouts in dev/prod

  • 8578c9b: Support self-hosters pushing to a custom registry when running deploy

  • 0e77e7e: v3: Trigger delayed runs and reschedule them

  • e417aca: Added config option extraCACerts to ProjectConfig type. This copies the ca file along with additionalFiles and sets NODE_EXTRA_CA_CERTS environment variable in built image as well as running the task.

  • 568da01: - Improve non-zero exit code error messages

    • Detect OOM conditions within worker child processes
    • Internal errors can have optional stack traces
    • Docker provider can be set to enforce machine presets
  • c738ef3: OTEL attributes can include Dates that will be formatted as ISO strings

  • ece6ca6: Fix issue when using SDK in non-node environments by scoping the stream import with node:

  • f854cb9: Added replayRun function to the SDK

  • 0e919f5: Better handle uncaught exceptions

  • 44e1b87: Improve the SDK function types and expose a new APIError instead of the APIResult type

  • 5526465: You can now add tags to runs and list runs using them

  • 6d9dfbc: Add configure function to be able to configure the SDK manually

  • e337b21: Add a postInstall option to allow running scripts after dependencies have been installed in deployed images

  • 719c0a0: Fixed incorrect span timings around checkpoints by implementing a precise wall clock that resets after restores

  • 4986bfd: Adding task with a triggerSource of schedule

  • e30beb7: Added support for custom esbuild plugins

  • 68d3242: Capture and display stderr on index failures

  • 374edef: Updates the trigger, batchTrigger and their *AndWait variants to use the first parameter for the payload/items, and the second parameter for options.

    Before:

    await yourTask.trigger({ payload: { foo: "bar" }, options: { idempotencyKey: "key_1234" } });
    await yourTask.triggerAndWait({
      payload: { foo: "bar" },
      options: { idempotencyKey: "key_1234" },
    });
    
    await yourTask.batchTrigger({
      items: [{ payload: { foo: "bar" } }, { payload: { foo: "baz" } }],
    });
    await yourTask.batchTriggerAndWait({
      items: [{ payload: { foo: "bar" } }, { payload: { foo: "baz" } }],
    });

    After:

    await yourTask.trigger({ foo: "bar" }, { idempotencyKey: "key_1234" });
    await yourTask.triggerAndWait({ foo: "bar" }, { idempotencyKey: "key_1234" });
    
    await yourTask.batchTrigger([{ payload: { foo: "bar" } }, { payload: { foo: "baz" } }]);
    await yourTask.batchTriggerAndWait([{ payload: { foo: "bar" } }, { payload: { foo: "baz" } }]);

    We've also changed the API of the triggerAndWait result. Before, if the subtask that was triggered finished with an error, we would automatically "rethrow" the error in the parent task.

    Now instead we're returning a TaskRunResult object that allows you to discriminate between successful and failed runs in the subtask:

    Before:

    try {
      const result = await yourTask.triggerAndWait({ foo: "bar" });
    
      // result is the output of your task
      console.log("result", result);
    } catch (error) {
      // handle subtask errors here
    }

    After:

    const result = await yourTask.triggerAndWait({ foo: "bar" });
    
    if (result.ok) {
      console.log(`Run ${result.id} succeeded with output`, result.output);
    } else {
      console.log(`Run ${result.id} failed with error`, result.error);
    }
  • e04d448: v3: sanitize errors with null unicode characters in some places

  • 2609389: When using idempotency keys, triggerAndWait and batchTriggerAndWait will still work even if the existing runs have already been completed (or even partially completed, in the case of batchTriggerAndWait)

    • TaskRunExecutionResult.id is now the run friendlyId, not the attempt friendlyId
    • A single TaskRun can now have many batchItems, in the case of batchTriggerAndWait while using idempotency keys
    • A run’s idempotencyKey is now added to the ctx as well as the TaskEvent and displayed in the span view
    • When resolving batchTriggerAndWait, the runtimes no longer reject promises, leading to an error in the parent task
  • 55d1f8c: Add callback to checkpoint created message

  • c405ae7: Make deduplicationKey required when creating/updating a schedule

  • 9e53829: Improve the display of non-object return types in the run trace viewer

  • b68012f: Move to our global system from AsyncLocalStorage for the current task context storage

  • 098932e: v3: vercel edge runtime support

  • 68d3242: - Fix uncaught provider exception

    • Remove unused provider messages
  • 9835f4e: v3: fix otel flushing causing CLEANUP ack timeout errors by always setting a forceFlushTimeoutMillis value

  • 3f8b6d8: v2: Better handle recovering from platform communication errors by auto-yielding back to the platform in case of temporary API failures

  • fde939a: Make optional schedule object fields nullish

  • 1281d40: When a v2 run hits the rate limit, reschedule with the reset date

  • ba71f95: Management SDK overhaul and adding the runs.list API

  • 03b104a: Added JSDocs to the schedule SDK types

  • f93eae3: Dynamically import superjson and fix some bundling issues

  • 5ae3da6: - Fix artifact detection logs

    • Fix OOM detection and error messages
    • Add test link to cli deployment completion
  • c405ae7: Added timezone support to schedules

  • 34ca766: v3: Include presigned urls for downloading large payloads and outputs when using runs.retrieve

  • 8ba9987: Added declarative cron schedules

  • 62c9a5b: Fixes an issue that caused failed tasks when resuming after calling triggerAndWait or batchTriggerAndWait in prod/staging (this doesn't effect dev).

    The version of Node.js we use for deployed workers (latest 20) would crash with an out-of-memory error when the checkpoint was restored. This crash does not happen on Node 18x or Node21x, so we've decided to upgrade the worker version to Node.js21x, to mitigate this issue.

    You'll need to re-deploy to production to fix the issue.

  • 392453e: Fix for when a log flush times out and the process is checkpointed

  • 8578c9b: Add remote forced externals system, in case we come across another package that cannot be bundled (spurred on by header-generator)

  • 6a379e4: Fix 3rd party otel propagation from breaking our Task Events data from being properly correlated to the correct trace

  • f854cb9: Added cancelRun to the SDK

  • 584c7da: - Add graceful exit for prod workers

    • Prevent overflow in long waits
  • 4986bfd: Added a new global - Task Catalog - to better handle task metadata

  • e69ffd3: - Clear paused states before retry

    • Detect and handle unrecoverable worker errors
    • Remove checkpoints after successful push
    • Permanently switch to DO hosted busybox image
    • Fix IPC timeout issue, or at least handle it more gracefully
    • Handle checkpoint failures
    • Basic chaos monkey for checkpoint testing
    • Stack traces are back in the dashboard
    • Display final errors on root span
  • b68012f: Extracting out all the non-SDK related features from the main @trigger.dev/core/v3 export

  • 39885a4: v3: fix missing init output in task run function when no middleware is defined

  • 8578c9b: fix node10 moduleResolution in @trigger.dev/core

  • e69ffd3: Improve handling of IPC timeouts and fix checkpoint cancellation after failures

  • 8578c9b: Only import import-in-the-middle hook if there are instrumented packages

  • f040417: Support for custom conditions

  • d934feb: Add more package exports that can be used from the web app

@trigger.dev/[email protected]

Major Changes

Patch Changes

  • b66d552: add machine config and secure zod connection

  • 9491a16: Implement task.onSuccess/onFailure and config.onSuccess/onFailure

  • b271742: Configurable log levels in the config file and via env var

  • 0591db5: Fixes for continuing after waits

  • f9ec66c: New Build System

  • 8cae1d0: Fix trigger functions for custom queues

  • 3a1b0c4: v3: Environment variable management API and SDK, along with resolveEnvVars CLI hook

  • 979bee5: Fix return type of runs.retrieve, and allow passing the type of the task to runs.retrieve

  • b68012f: Make msw a normal dependency (for now) to fix Module Not Found error in Next.js.

    It turns out that webpack will "hoist" dynamically imported modules and attempt to resolve them at build time, even though it's an optional peer dep:

    https://x.com/maverickdotdev/status/1782465214308319404

  • 203e002: Add runs.retrieve management API method to get info about a run by run ID

  • 1b90ffb: v3: Usage tracking

  • 51bb4c8: Fix for calling trigger and passing a custom queue

  • 4986bfd: Export queue from the SDK

  • 086a0f9: Extract common trigger code into internal functions and add a tasks.batchTriggerAndWait function

  • 4f95c9d: v3: recover from server rate limiting errors in a more reliable way

  • 0591db5: Rollback to try and fix some dependent attempt issues

  • 8578c9b: Support self-hosters pushing to a custom registry when running deploy

  • 0e77e7e: v3: Trigger delayed runs and reschedule them

  • ecf1110: v3: Export AbortTaskRunError from @trigger.dev/sdk/v3

  • f854cb9: Added replayRun function to the SDK

  • 44e1b87: Improve the SDK function types and expose a new APIError instead of the APIResult type

  • 5526465: You can now add tags to runs and list runs using them

  • 6d9dfbc: Add configure function to be able to configure the SDK manually

  • ecef199: Use global setTimeout to ensure cross-runtime support

  • 719c0a0: Fixed incorrect span timings around checkpoints by implementing a precise wall clock that resets after restores

  • 4986bfd: Adding task with a triggerSource of schedule

  • e9a63a4: Lock SDK and CLI deps on exact core version

  • 374edef: Updates the trigger, batchTrigger and their *AndWait variants to use the first parameter for the payload/items, and the second parameter for options.

    Before:

    await yourTask.trigger({ payload: { foo: "bar" }, options: { idempotencyKey: "key_1234" } });
    await yourTask.triggerAndWait({
      payload: { foo: "bar" },
      options: { idempotencyKey: "key_1234" },
    });
    
    await yourTask.batchTrigger({
      items: [{ payload: { foo: "bar" } }, { payload: { foo: "baz" } }],
    });
    await yourTask.batchTriggerAndWait({
      items: [{ payload: { foo: "bar" } }, { payload: { foo: "baz" } }],
    });

    After:

    await yourTask.trigger({ foo: "bar" }, { idempotencyKey: "key_1234" });
    await yourTask.triggerAndWait({ foo: "bar" }, { idempotencyKey: "key_1234" });
    
    await yourTask.batchTrigger([{ payload: { foo: "bar" } }, { payload: { foo: "baz" } }]);
    await yourTask.batchTriggerAndWait([{ payload: { foo: "bar" } }, { payload: { foo: "baz" } }]);

    We've also changed the API of the triggerAndWait result. Before, if the subtask that was triggered finished with an error, we would automatically "rethrow" the error in the parent task.

    Now instead we're returning a TaskRunResult object that allows you to discriminate between successful and failed runs in the subtask:

    Before:

    try {
      const result = await yourTask.triggerAndWait({ foo: "bar" });
    
      // result is the output of your task
      console.log("result", result);
    } catch (error) {
      // handle subtask errors here
    }

    After:

    const result = await yourTask.triggerAndWait({ foo: "bar" });
    
    if (result.ok) {
      console.log(`Run ${result.id} succeeded with output`, result.output);
    } else {
      console.log(`Run ${result.id} failed with error`, result.error);
    }
  • 2609389: When using idempotency keys, triggerAndWait and batchTriggerAndWait will still work even if the existing runs have already been completed (or even partially completed, in the case of batchTriggerAndWait)

    • TaskRunExecutionResult.id is now the run friendlyId, not the attempt friendlyId
    • A single TaskRun can now have many batchItems, in the case of batchTriggerAndWait while using idempotency keys
    • A run’s idempotencyKey is now added to the ctx as well as the TaskEvent and displayed in the span view
    • When resolving batchTriggerAndWait, the runtimes no longer reject promises, leading to an error in the parent task
  • b68012f: Move to our global system from AsyncLocalStorage for the current task context storage

  • c9e1a3e: Remove unimplemented batchOptions

  • cf13fbd: Add triggerAndWait().unwrap() to more easily get at the output or throw the subtask error

  • 3f8b6d8: v2: Better handle recovering from platform communication errors by auto-yielding back to the platform in case of temporary API failures

  • 1281d40: When a v2 run hits the rate limit, reschedule with the reset date

  • ba71f95: Management SDK overhaul and adding the runs.list API

  • 7c36a1a: v3: Adding SDK functions for triggering tasks in a typesafe way, without importing task file

  • f93eae3: Dynamically import superjson and fix some bundling issues

  • c405ae7: Added timezone support to schedules

  • 34ca766: v3: Include presigned urls for downloading large payloads and outputs when using runs.retrieve

  • 8ba9987: Added declarative cron schedules

  • f854cb9: Added cancelRun to the SDK

  • 4986bfd: Added a new global - Task Catalog - to better handle task metadata

  • b68012f: Extracting out all the non-SDK related features from the main @trigger.dev/core/v3 export

  • 8578c9b: Remove msw and retry.interceptFetch

  • Updated dependencies [ed2a26c]

  • Updated dependencies [c702d6a]

  • Updated dependencies [9882d66]

  • Updated dependencies [b66d552]

  • Updated dependencies [e3db257]

  • Updated dependencies [9491a16]

  • Updated dependencies [1670c4c]

  • Updated dependencies [b271742]

  • Updated dependencies [cf13fbd]

  • Updated dependencies [dbda820]

  • Updated dependencies [4986bfd]

  • Updated dependencies [eb60126]

  • Updated dependencies [f9ec66c]

  • Updated dependencies [f7d32b8]

  • Updated dependencies [09413a6]

  • Updated dependencies [3a1b0c4]

  • Updated dependencies [203e002]

  • Updated dependencies [b4f9b70]

  • Updated dependencies [1b90ffb]

  • Updated dependencies [5cf90da]

  • Updated dependencies [9af2570]

  • Updated dependencies [7ea8532]

  • Updated dependencies [1477a2e]

  • Updated dependencies [4f95c9d]

  • Updated dependencies [83dc871]

  • Updated dependencies [d490bc5]

  • Updated dependencies [e3cf456]

  • Updated dependencies [14c2bdf]

  • Updated dependencies [9491a16]

  • Updated dependencies [0ed93a7]

  • Updated dependencies [8578c9b]

  • Updated dependencies [0e77e7e]

  • Updated dependencies [e417aca]

  • Updated dependencies [568da01]

  • Updated dependencies [c738ef3]

  • Updated dependencies [ece6ca6]

  • Updated dependencies [f854cb9]

  • Updated dependencies [0e919f5]

  • Updated dependencies [44e1b87]

  • Updated dependencies [5526465]

  • Updated dependencies [6d9dfbc]

  • Updated dependencies [e337b21]

  • Updated dependencies [719c0a0]

  • Updated dependencies [4986bfd]

  • Updated dependencies [e30beb7]

  • Updated dependencies [68d3242]

  • Updated dependencies [374edef]

  • Updated dependencies [e04d448]

  • Updated dependencies [2609389]

  • Updated dependencies [55d1f8c]

  • Updated dependencies [c405ae7]

  • Updated dependencies [9e53829]

  • Updated dependencies [b68012f]

  • Updated dependencies [098932e]

  • Updated dependencies [68d3242]

  • Updated dependencies [9835f4e]

  • Updated dependencies [3f8b6d8]

  • Updated dependencies [fde939a]

  • Updated dependencies [1281d40]

  • Updated dependencies [ba71f95]

  • Updated dependencies [395abe1]

  • Updated dependencies [03b104a]

  • Updated dependencies [f93eae3]

  • Updated dependencies [5ae3da6]

  • Updated dependencies [c405ae7]

  • Updated dependencies [34ca766]

  • Updated dependencies [8ba9987]

  • Updated dependencies [62c9a5b]

  • Updated dependencies [392453e]

  • Updated dependencies [8578c9b]

  • Updated dependencies [6a379e4]

  • Updated dependencies [f854cb9]

  • Updated dependencies [584c7da]

  • Updated dependencies [4986bfd]

  • Updated dependencies [e69ffd3]

  • Updated dependencies [b68012f]

  • Updated dependencies [39885a4]

  • Updated dependencies [8578c9b]

  • Updated dependencies [e69ffd3]

  • Updated dependencies [8578c9b]

  • Updated dependencies [f040417]

  • Updated dependencies [d934feb]

@trigger.dev/[email protected]

@trigger.dev/[email protected]

@github-actions github-actions bot force-pushed the changeset-release/main branch 9 times, most recently from c231e6b to 555992a Compare August 29, 2024 20:59
@github-actions github-actions bot force-pushed the changeset-release/main branch 11 times, most recently from 6a20de4 to 327823b Compare September 8, 2024 09:32
@github-actions github-actions bot force-pushed the changeset-release/main branch 10 times, most recently from ccd0ba4 to 50934cd Compare September 12, 2024 09:17
@github-actions github-actions bot force-pushed the changeset-release/main branch 8 times, most recently from 0159e21 to 062b6ab Compare September 16, 2024 14:20
@github-actions github-actions bot changed the title chore: Update version for release (beta) chore: Update version for release Sep 16, 2024
@github-actions github-actions bot force-pushed the changeset-release/main branch from 062b6ab to dd92fc1 Compare September 16, 2024 14:34
@ericallam ericallam merged commit 45287cd into main Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant