Commit Graph

6698 Commits

Author SHA1 Message Date
Matt Aitken 8483900832 Updated queue/concurrency docs for v4 (#2418) 2025-08-20 11:47:56 +01:00
Matt Aitken 4264fc066e chore(webapp): More false errors turned to logs (#2422)
* Remove variables from dequeue log message

* Continue snapshot throw json

* Waiting for deploy error removed

* Realtime ECONNRESET is expected

* Redis worker logErrors changes, removed ids

* Preview branch without a branch shouldn't log an error, it's a user provided issue

* "Task run is not in a cancellable state" isn't an error, it's expected

* "CreateCheckpointService: Child run already resumed" is expected

* "CreateCheckpointService: Batch already resumed" is expected

* "Failed to insert events, will attempt bisection" changed to info, we have errors for complete failures

* Ignore "PrismaClient error"

* Don't log Redis worker DLQ errors if we're ignoring

* "Failed to parse machine config" is fine, sometimes a config is null or undefined

* "Failed to parse machine config" for v3

* MetadataTooLargeError shouldn't log an error
2025-08-20 11:44:26 +01:00
nicktrn da79c2b185 chore(docker): add registry namespace var to .env.example (#2426) 2025-08-20 11:03:30 +01:00
nicktrn 677b7aed9c chore(docs): update bun guide (#2425)
* chore(docs): remove missing snippet references

* chore(docs): update bun guide
2025-08-20 11:03:23 +01:00
nicktrn 9092ca863f feat(supervisor): add ecr support to docker client (#2424) 2025-08-20 10:49:19 +01:00
James Ritchie b41129a24f Tabular-nums for the individually selected runs number (#2421) 2025-08-19 16:24:02 +01:00
James Ritchie 0261ccbc68 Fixes conflicting shortcut keys (#2420) 2025-08-19 15:38:53 +01:00
nicktrn 32e3fab5ea feat(helm): release 4.0.0 chart version (#2416)
* feat(helm): release 4.0.0 chart version

* chore(helm): remove last few beta references

* fix(docker): use latest tag for commands shown in webapp
2025-08-19 11:06:35 +02:00
Matt Aitken 0ee4234117 Reduce false error logging (round 1) (#2415)
* Don't log an error when the snapshot shouldn't be created, it's normal for this to happen

* Slack alerts, skip `account_inactive` errors

* v3 finalize run with no locked isn't an error

* Another false error

* Finalize run CRASHED runs were logging errors

* All slack alert errors are warnings except invalid blocks
2025-08-19 09:58:21 +01:00
Matt Aitken 471c96079a Some more queue docs changes for v4 (#2414) 2025-08-18 16:49:43 +01:00
Eric Allam 0ae59cf7b9 fix appEnv on undefined error and useShortcuts error on ErrorBoundary (#2412) 2025-08-18 15:42:16 +01:00
Matt Aitken 49e6470b6b Added missing trigger.config options to the docs (#2409) 2025-08-18 15:11:34 +01:00
Matt Aitken 9dd831f68a Fix for v4 pending versions not getting dequeued after a deploy (#2411)
We didn’t call `scheduleEnqueueRunsForBackgroundWorker` in the right 
place…
2025-08-18 15:09:12 +01:00
nicktrn 112f6f602e feat(supervisor): optionally strip digests from image refs (#2410) 2025-08-18 15:08:49 +01:00
github-actions[bot] 0b35cc35e0 Release v4.0.0 🚀
🚀 Publish Trigger.dev Docker / units (push) Failing after 0s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 4s
🚀 Publish Trigger.dev Docker / publish-webapp (push) Has been skipped
🚀 Publish Trigger.dev Docker / publish-worker (push) Has been skipped
🚀 Publish Trigger.dev Docker / publish-worker-v4 (push) Has been skipped
@trigger.dev/build@4.0.0 @trigger.dev/core@4.0.0 @trigger.dev/python@4.0.0 @trigger.dev/react-hooks@4.0.0 @trigger.dev/redis-worker@4.0.0 @trigger.dev/rsc@4.0.0 @trigger.dev/schema-to-json@4.0.0 @trigger.dev/sdk@4.0.0 trigger.dev@4.0.0 v.docker.4.0.0
2025-08-18 12:35:03 +01:00
James Ritchie fade22015f Docs – v4 GA updates (#2298)
* Adds new features table to top of v4 upgrade guide

* Adds wait idempotency to wait-until, wait-for, and wait-for-token pages

* Adds new priority docs page and updates the v4 upgrade guide

* Adds new task lifecycle hooks

* Removes the message about requiring tasks to be exported

* Adds new global lifecycle hooks section

* Moves sections from upgrade guide into the table

* Adds hidden task page

* Improves the global lifecycle hooks section

* Updates middleware and locals section

* Adds new useWaitToken page to the react hooks section

* Adds a new ai.tool section

* Moves Docker (legacy) page into self-hosting section

* Removes known issues from v4 upgrade guide

* Replace “toolTask” with “ai.tool” in the Streams page example

* Renames guide to “Migrating from v3” and adds redirect

* Remove references to v4

* Removes changelog from migration guide

* The installation guide now references `@latest update`

* Changes all references from `/sdk/v3` to `/sdk`

* Updates @v4-beta to @latest

* Fixed broken link

* Fixes broken link

* Adds an upgrade to v4 using AI section

* Fixes 2 broken links

* Adds an entry for targetting preview branches

* Updates the run statuses

* Adds boolean helpers section to the runs and realtime pages

* Updates the concurrency page

* Updates the test page to include the new options

* Adds SDK and curl options for the preview branch targeting

* Updates new bulk actions page

* Remove the releasing concurrency section

* Got rid of some more @v4-beta mentions

* Improved rate limit docs

* Improved migrating docs

* Removed commented sections of the docs

* useWaitToken hook

* Fixed the description

* Fix for missing test image

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
Co-authored-by: Dan <8297864+D-K-P@users.noreply.github.com>
2025-08-18 12:34:55 +01:00
Dan 78af477efc Updated readmes (#2408)
* readme wip

* Added new commands

* Simplified readme

* Added docs links and improved about

* Added nice header and updated links

* Consistent headers

* Copy update
2025-08-18 12:10:15 +01:00
Eric Allam e864973e01 chore(packages): leave changesets prerelease mode (#2406) 2025-08-18 11:06:31 +01:00
github-actions[bot] 132008ff64 Release 4.0.0-v4-beta.28 (#2386)
* chore: Update version for release (v4-beta)

* Release 4.0.0-v4-beta.28

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: nicktrn <55853254+nicktrn@users.noreply.github.com>
@trigger.dev/python@4.0.0-v4-beta.28 @trigger.dev/build@4.0.0-v4-beta.28 @trigger.dev/core@4.0.0-v4-beta.28 @trigger.dev/react-hooks@4.0.0-v4-beta.28 @trigger.dev/redis-worker@4.0.0-v4-beta.28 @trigger.dev/rsc@4.0.0-v4-beta.28 @trigger.dev/schema-to-json@4.0.0-v4-beta.28 @trigger.dev/sdk@4.0.0-v4-beta.28 trigger.dev@4.0.0-v4-beta.28
2025-08-17 20:30:33 +01:00
nicktrn 26d4d08bdc chore: move all placement tag helpers to core (#2403)
* chore: move all placement tag helpers to core

* move placement tag utils into server-only
2025-08-15 17:19:39 +01:00
Eric Allam 1a8880971d fix(runner): prevent retry immediately race condition which can cause stuck runs that end up being system failures (#2402) 2025-08-15 17:05:02 +01:00
Eric Allam 3d17ce5559 feat: AI SDK 5.0 support (#2396)
* feat: AI SDK 5.0 support

* Add changeset
2025-08-15 17:03:39 +01:00
nicktrn a76905e272 chore(bun): upgrade to bun v1.2.20 (#2398) 2025-08-15 17:01:06 +01:00
Eric Allam 1c73ab930b fix(realtime): waitUntil now correctly waits for metadata.streams to finish (#2399) 2025-08-15 17:00:45 +01:00
Eric Allam 816c7ad56e fix(webapp): remove unnecessary log (#2401) 2025-08-15 12:47:55 +01:00
Eric Allam 4d975b19e7 fix: external traces now respect parent sampling, and prevent broken traces when there is no external trace context (#2395)
* fix: external traces now respect parent sampling, and prevent broken traces when there is no external trace context

* Add changeset

* improve trace flag handling and better internal host checking

* the traceFlags are now being properly passed through as a number
2025-08-15 10:12:38 +01:00
Eric Allam 4c4b774bab fix(webapp): Don't propogate region when replaying a run from or to development (#2400) 2025-08-15 10:07:59 +01:00
nicktrn fa7f4b1fed feat(k8s): add placement tags for flexible node selection (#2390)
* add tier scheduling support to supervisor

* add billing info to dequeued message w/o cache

* add cache with best effort invalidation

* fix invalidate circular dep

* add changeset

* use new plan type on runs as fallback during dequeue

* tidy up

* be more explicit with plan type fallback

* remove additional billing check from hot path

* switch to placement tags

* update changeset

* update platform package

* start using new entitlement response

* ensure skipChecks optimization validates at batch level

* add optional items to add to queue manager limits

* make the bool env helper only accept boolean defaults

* remove redundant private field

* update placement tag helper to prevent unsupported tags
2025-08-15 09:52:14 +01:00
Saadi Myftija f76765448b feat: show gh username and avatar for deployments triggerd by the github app integration (#2394)
Small change that shows the github user in the deployments page in cases
where it was triggered by the github app integration.

These deployments are not triggered using a PAT, so we cannot associate
them with a Trigger user ID.
2025-08-14 18:20:59 +02:00
Saadi Myftija 944b1875f1 feat: gather deployment git meta from the build server (#2392)
This PR adapts the deployment command to also evaluate build server env
variables when creating the git meta. The build server will initially
only support deployments triggered by the github app, but we might add
other git providers in the future.

Sticking to the GH actions naming convention for the env variables set
by the build server in favor of consistency.
2025-08-14 16:07:36 +02:00
Eric Allam a5dd6389b2 fix: sentry memory leak by patching @sentry/remix to stop cloning request (#2389)
* fix: sentry memory leak by disabling includeLocalVariables

* Enhance heap snapshot consistency and labeling

To facilitate more accurate and consistent heap memory snapshots, a new function forceConsistentGC was added before taking a snapshot. This ensures the garbage collector (GC) runs multiple times, stabilizing the heap state for more reliable analysis. This is particularly helpful when debugging memory-related issues.

Updates to the memory-leak-detector script now allow labeling of snapshot runs using the --label flag. This helps in distinguishing different runs for easier tracking and comparison of memory usage across test sessions. Additionally, the --expose-gc flag ensures that the GC can be manually triggered during test runs, leading to more consistent memory states and potentially uncovering hidden memory leaks.

* Refactor forceConsistentGC for improved readability

The function forceConsistentGC was refactored to enhance code readability and consistency. The main improvements include:

- Updated syntax for consistent string quotation and spacing.
- Simplified garbage collection by removing specific major/minor GC calls, as the distinction isn't necessary.
- Implemented minor changes to arrow function formatting for consistency.

These changes neither impact the program logic nor the function behavior but help maintain code quality standards and readability.

* Fix memory leak by removing request.clone() usage

Identified that the memory leak in the project was linked to the usage of request.clone() within the `@sentry/remix` package's callRouteAction handler. Although initially suspected as a Sentry issue, the problem appears to arise from the handling of request.clone() in Remix version 2.1.0. By removing the call to request.clone(), the memory leak has been resolved.

- Introduced garbage collection execution before snapshot to manage memory allocation effectively.
- Improved error handling and timeout mechanisms in the memory leak detector to enhance its resilience during runtime.
- Expanded testing for both GET and POST requests to monitor and validate potential memory leaks better. The POST requests involve sending large payloads to stress-test the system.
- The modification particularly focuses on enhancing robust memory tracking and providing detailed progress reporting during request phases.

* patch @sentry/remix to prevent memory leaks

* Fix pnpm lock

* undo some unrelated changes
2025-08-14 14:50:20 +01:00
Saadi Myftija 3ec95cd72d fix: code editor/block theme inconsistency (#2393)
Tiny fix to make the themes across code blocks and editor components across the app consistent.
2025-08-14 11:41:36 +02:00
Eric Allam 6f29b7dc34 fix: legacyDevProcessCwdBehaviour defaults to true (#2387)
This fixes an issue with prisma not being able to locate the native 
add-on binary
2025-08-13 14:30:10 +01:00
Eric Allam ed07bf9306 fix: prevent circular reference errors on task indexing when using schemaTask (#2383)
* fix: prevent circular reference errors on task indexing when using schemaTask

* add changeset
2025-08-13 14:10:57 +01:00
Matt Aitken cd6a0b3a3e fix: heartbeat race condition (acking) (#2380)
* The logger now supports metadata

* Added metadata to ServiceValidationError in some critical places

* Don't ack the heartbeat if there's a mismatch, it might prevent a brand new one

* Don't ack the heartbeat inside stalled. By returning it will be acked IF the deduplication key matches
2025-08-12 10:35:21 +02:00
Eric Allam e9cc7de8ea docs: Add beta.27 changelog (#2381) 2025-08-11 22:06:12 +01:00
github-actions[bot] 0448f3603a Release 4.0.0-v4-beta.27
* chore: Update version for release (v4-beta)

* Release 4.0.0-v4-beta.27

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Aitken <matt@mattaitken.com>
@trigger.dev/python@4.0.0-v4-beta.27 @trigger.dev/build@4.0.0-v4-beta.27 @trigger.dev/react-hooks@4.0.0-v4-beta.27 @trigger.dev/redis-worker@4.0.0-v4-beta.27 @trigger.dev/rsc@4.0.0-v4-beta.27 trigger.dev@4.0.0-v4-beta.27 @trigger.dev/sdk@4.0.0-v4-beta.27 @trigger.dev/schema-to-json@4.0.0-v4-beta.27 @trigger.dev/core@4.0.0-v4-beta.27
2025-08-11 15:39:59 +01:00
Matt Aitken dd4515a2eb Merge pull request #2379 from triggerdotdev/remove-trigger-and-poll
Remove triggerAndPoll()
2025-08-11 15:11:58 +01:00
Matt Aitken 97e5c22051 Added a changeset 2025-08-11 13:42:14 +01:00
Matt Aitken b8d2fb215f Remove triggerAndPoll() 2025-08-11 13:40:37 +01:00
Takeoff 21c2c136be test coverage for utils (#2057) 2025-08-11 11:53:03 +01:00
Matt Aitken ae19d0f491 Only start an attempt if not finished. Send message to worker if pending executing (#2377)
* Only start an attempt if not finished. Send message to worker if pending executing

* Fix the exit process reason tet

* Fixed cancelling test since bug fix

The old behaviour was wrong for pending executing in the test
2025-08-11 11:46:10 +01:00
Matt Aitken c58b78f43f Exit the process if status is finished and not in the middle of completing (#2378)
This solves an issue where a run is system failed from the platform and 
the worker is never shut down in the cluster.
2025-08-11 11:22:26 +01:00
Matt Aitken a968c23678 Don't use a failed run with idempotency in v4 (#2376) 2025-08-08 14:01:18 +01:00
nicktrn 4b08597c77 feat: optional v4 deploy registry overrides (#2370)
* feat: optional v4 deploy registry overrides

* only require credentials for non-ecr registries
2025-08-07 17:02:01 +01:00
Matt Aitken 9ce4f57a6a Upgraded v4 experimental flags. keepNames and autoDetectExternal now default to true. (#2371)
* keepNames default true, not experimental now

* Added docs for the `environments` declarative schedules feature

* minify and autoDetectExternal (true now)

* processKeepAlive

* devProcessCwdInBuildDir

* Changeset

* Switch to legacyDevProcessCwdBehaviour
2025-08-07 16:47:45 +01:00
nicktrn 363b9b15b4 fix(engine): set correct run status after requeue and snapshot status after dequeue (#2367)
* set correct run status on snapshot after dequeue

* set run status back to PENDING when we requeue

* remove retrying after failure status from v4 and fix tests

* fix one last test
2025-08-07 16:46:27 +01:00
James Ritchie 51305b6023 Onboarding dashboard background (#2346)
* Adds a background image dashboard wrapper

* Dashboard background image

* Adds a background image to the welcome onboarding page

* Background is constructed of 3 images

* Adds the background to the create org page

* Adds a background to the choose plan page

* Change the default button spinner color to white

* Adds the background to the create new project page

* Updates the invite team member page

* Adds background image to received invite page
2025-08-07 16:13:42 +01:00
Dan 9e41e83818 Restructured the realtime docs (#2317)
* Reordered react hooks + frontend sections

* Updated the overview and nav

* Separated out SWR hooks

* Restructured metadata sections

* Improved backend docs

* Fixed broken link

* Fixed broken links

* Updated the structure

* Restructured overview

* Updated examples cards

* Improved overview

* Updated how it works

* Updated auth

* Added type safety to the run object page

* made the subscribe description clearer

* Fixed links in triggering

* Fixed link

* Removed examples footers

* Copy tweak

* Consolidated metadata and subscribe pages

* moved metadata task examples to metadata

* Fixed links

* Fixing links like zelda

* Removed dead import

* Clearer titles

* Cap R for Realtime

* Fixes broken link

---------

Co-authored-by: James Ritchie <james@trigger.dev>
2025-08-07 16:02:52 +01:00
Matt Aitken da7dc74fa4 Replaying keeps the original run region (#2368) 2025-08-07 14:43:28 +01:00