Commit Graph

5688 Commits

Author SHA1 Message Date
Eric Allam b5867627be Use idempotency key index when finding existing runs by idempotency key in batch (#1677) 2025-02-07 13:36:03 +00:00
Eric Allam 0b555faf01 Force upgrade v1 batches to v3 (#1676)
* Force upgrade v1 batches to v3

* Actually lets process v1 batches async
2025-02-06 22:37:26 +00:00
Eric Allam dcf1ab6f38 Remove schedule constraints from TaskRun to prevent db load issues when a schedule or instance is deleted (#1674) 2025-02-06 19:16:48 +00:00
Matt Aitken c49af774ba Retry batch item completion (#1675)
* Added isPrismaRetriableError()

* Retry completeBatchTaskRunItem if they fail because of a retriable Prisma error

* Retry using Redis worker

* Handle more retriable errors. Add special condition in for race condition error

* Added Postgres connection_timeout with default 20s

* Added a simple batchTriggerAndWait example
2025-02-06 19:16:30 +00:00
Eric Allam f00ed9b13e Add the sha256 digest to the deployment image reference (#1673) 2025-02-06 19:14:34 +00:00
Eric Allam 3ec6983e45 Move run ttl and delays from graphile to redis worker (#1672) 2025-02-06 14:25:37 +00:00
Eric Allam a2c2d920b7 Use redis worker for run heartbeats and alerts (#1669)
* Move the task run heartbeats to RedisWorker

* Move alerts to redis worker, improving redis worker

* Fix typecheck errors

* Use single threaded tests for redis worker

* Enable/disable the redis workers independently

* Remove preview release from PR checks
2025-02-06 10:21:57 +00:00
nicktrn b946b9f38e Add optional env var and label to disable image pre-pulls (#1667)
* add env var to disable pre-pulls

* add label to disable pre-pulls on specific nodes
2025-02-05 16:49:57 +00:00
Eric Allam 99d38151f6 Auto-fix config.dirs of /trigger and /src/trigger (#1665) 2025-02-05 13:00:18 +00:00
Eric Allam e35b6f539a Release 3.3.13 (#1664)
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 0s
🚀 Publish Trigger.dev Docker / units (push) Failing after 0s
🚀 Publish Trigger.dev Docker / publish-webapp (push) Has been skipped
🚀 Publish Trigger.dev Docker / publish-worker (push) Has been skipped
@trigger.dev/react-hooks@3.3.13 @trigger.dev/build@3.3.13 @trigger.dev/core@3.3.13 @trigger.dev/rsc@3.3.13 @trigger.dev/sdk@3.3.13 trigger.dev@3.3.13 v.docker.3.3.13
2025-02-04 16:32:26 +00:00
github-actions[bot] 20d983e08a chore: Update version for release (#1654)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-04 16:31:00 +00:00
Eric Allam 3887c4a621 Fix "no tasks defined" issue (fix #1681) (#1663) 2025-02-04 16:08:57 +00:00
Eric Allam e61573600b Reduce contention on batchTaskRun when setting expected count (#1662) 2025-02-04 13:43:50 +00:00
Eric Allam 53e6d478ed Fix deploy timeout issues (#1661)
* deploy v2 streaming WIP

* finalize deployment now SSE and won't timeout

* handle zodfetchSSE connection errors

* Create tender-cycles-melt.md
2025-02-04 12:44:14 +00:00
nicktrn 7fa45ad337 Fix pre-pulling of deployment images onto worker nodes (#1660)
* lint

* get pre-pull data from finalized deployment
2025-02-04 10:07:07 +00:00
Eric Allam 42c5f4d9fa Add text_pattern_ops index on SecretKey.key to improve getSecrets perf (#1659) 2025-02-03 22:52:16 +00:00
Eric Allam 6f52b00560 Set taskRunAttemptId on batch task run items on completion (#1658) 2025-02-03 15:25:12 +00:00
D-K-P d285f7930e Added guides and examples links and snippet 2025-02-03 14:30:03 +00:00
Eric Allam b377b577ca db efficiency improvements (#1657)
- remove calls to findUnique, especially when including/selecting relations
- add some missing indexes
- add spans to $transaction calls to help track down long running txs
2025-02-03 13:59:58 +00:00
Eric Allam b67ea9a2f5 improve batch completion system for run engine v1 (#1656)
* Automatically retry TriggerTaskService when hitting a unique constraint error on idempotency key

* improve batch completion system for run engine v1

* Rename batch stuff to v3 so it's not confusing

* Handle unique constraint error on BatchTaskRunItem creation and allow different limits for batchTrigger and batchTriggerAndWait
2025-02-03 11:29:51 +00:00
D-K-P de31220820 Docs correction 2025-01-31 15:15:23 +00:00
Eric Allam 3641647add Add the keyPrefix option when redis is not in cluster mode (#1655) 2025-01-31 10:50:52 +00:00
D-K-P 664bce561d Added vercel ai sdk image generator example to the docs 2025-01-30 15:39:28 +00:00
Eric Allam 73471589ef Fixed issue with asResponse and withResponse not working on runs.retrieve (#1648) 2025-01-30 14:01:38 +00:00
Eric Allam 813d73d1a3 Fix issue with heavy contention on TaskQueue updating concurrency limit (#1653)
* Fix issue with heavy contention on TaskQueue updating concurrency limit

* Remove concurrency limit when creating background worker tasks
2025-01-30 14:01:11 +00:00
nicktrn 9ad396bdb1 Fix custom queue docs 2025-01-30 13:53:48 +00:00
James Ritchie 4e7c55920d Docs maxDuration page now states it’s a required param 2025-01-29 19:30:25 +00:00
Eric Allam 3eede3c339 Better handle redis error events (#1652) 2025-01-29 17:27:52 +00:00
Eric Allam b3afbcf558 Correctly configure redis cluster for aws elasticache (#1651) 2025-01-29 16:56:51 +00:00
Eric Allam f43de6ab74 Support redis/valkey cluster mode (#1650) 2025-01-29 16:28:51 +00:00
mintlify[bot] 3127df5b67 Add new Bulk Actions section to documentation (#1649)
* Documentation edits made through Mintlify web editor

* Moves files to correct path and improves copy

* Corrects video props to camel case and removes deprecated prop

* Link to the new bulk actions page from the replaying page

---------

Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
Co-authored-by: James Ritchie <james@trigger.dev>
2025-01-29 16:01:01 +00:00
Eric Allam 9fd175e860 Prevent findUnique from bringing down our database (#1633) 2025-01-29 13:57:16 +00:00
Eric Allam ef0fc6b0b4 Support for logically separated redis instances (#1647)
* Remove unnecessary disabled org check

* Add support for separate redis servers for caching, rate limiter, marqs, and the pub/sub stuff (they all default to the previously used env vars for redis)
2025-01-29 13:53:58 +00:00
Eric Allam a24b2a7732 More v1 run engine fixes (#1644)
* Remove the socket count from shared queue consumer cause it can take up to 5s to complete

* Add support for re-using queue snapshots across dequeues

* Only consider the top N orgs when dequeuing, to help mitigate large spikes in queues (like around the hour and half hour marks)
2025-01-28 16:16:37 +00:00
Eric Allam 6da5e7a4cf Various fixes for run engine v1 (#1643)
* Various fixes for run engine v1

- Make sure there are connected providers before sending a scheduled attempt message, nack and retry if there are not
- Fail runs that fail task heartbeats when pending and locked
- More and better logging around shared queue consumer
- Fix bug when failing a task run with no attempt

* Prevent findUnique from bringing down our database
2025-01-27 17:15:17 +00:00
Eric Allam 75753ec5ad Release 3.3.12 @trigger.dev/react-hooks@3.3.12 @trigger.dev/build@3.3.12 @trigger.dev/core@3.3.12 @trigger.dev/rsc@3.3.12 @trigger.dev/sdk@3.3.12 trigger.dev@3.3.12 2025-01-24 19:19:55 +00:00
github-actions[bot] 40e0d2f7e9 chore: Update version for release (#1626)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-24 19:18:39 +00:00
Eric Allam 246eb4361e If a deployment is already deployed, just return the deployment so the request succeeds (#1639) 2025-01-24 18:47:26 +00:00
nicktrn ab6e6afbf5 switch to github builders 2025-01-24 18:15:40 +00:00
Eric Allam 7445d9bf35 install ca-certificates in docker image (#1638) 2025-01-24 18:01:42 +00:00
Eric Allam f6eeaa1001 Fix broken cloud deploys by using depot ephemeral registry, skip the registry proxy (#1637) 2025-01-24 17:22:35 +00:00
Eric Allam eaf46bac58 engine v1 improved dequeue selection algorithm (#1632)
* engine v1 fairness improvements (env based queue selection)

* Add ability to bias env selection by concurrency limit and capacity

* Add some randomization to the list of queues within each evn

* Configure biases using env vars

* Typo

* revert v3 catalog project ref change

* Fix v2 marqs
2025-01-23 15:01:42 +00:00
James Ritchie 16cf357380 Focus visible style refinements (#1577)
* reduces the thickness of the focus-visible

* More subtle Input style

* Updates focus-visible styles for the SimpleSelect

* Tables tab through rows and action cells only

* Refined focus visible style

* Adds the custom focus visible to the TextLink

* Moves the onClick handling to the table row rather than the cell

* Makes table row heights consistent

* Adds gap between task search bar and button

* Prevents long tag values from wrapping

* Removes unnecessary rows from table header

* Added gap between search and filters

* Fixes the schedules table pagination staying fixed to the bottom of the page

* Removed more unnecessary header table rows to prevent them being selectable

* Removed isSelected styles (not working)

* Added <tr> back to the main Table compontent

* Table row handles modifier keys

* Adds to={path} to the TableRow only

* Revert "Adds to={path} to the TableRow only"

This reverts commit 8a814d434ff85b8ab9c2305d336074f659d86094.

* Revert "Table row handles modifier keys"

This reverts commit b2394741fa2ed6b908e00673b1a395ae89ca7146.

* Table reverted to use linked cells rather than rows

* Set the tab index of a cell and style the table row when tabbed

* Tabbed row style applied to the sticky cells

* Adds isTabbableCell to each table

* Improves the spcificity of the row highlighting

* Reduces the height of the task rows to match the other tables

* Adds tab styles to fill in row dividers top and bottom

* Removed old row onClick and to props

* Removed duplicate table header row

* Creates table style variants so tables look good in the inspector panels

* Full width tables on the schedules inspector panel

* Reduce padding on Alerts page table rows

* Updates the Deploy page inspector table to the new style

* Removes the duplicate Table Row from the table headers in v2

* Adds TableRow to the EventsTable

* Adds TableRow to more tables

* Adds TableRow to more tables

* Adds TableRow to more tables

* Adds TableRow to more tables

* Fix for showing correct cursor for linked table rows

* Removed variants from some of the table components
2025-01-21 21:11:59 +00:00
Eric Allam f96bf7210b Engine v1 improvements (#1627)
* Efficiency improvements to SharedQueueConsumer and MarQS for run engine v1

* Reliabily resolve task queue for a run and ack runs where we can't find the queue

* engine v1: stop nacking after reaching the max nack count, ack to remove the message

* Handle division by 0 possibility in distributeQueues
2025-01-21 14:24:02 +00:00
James Ritchie c855e4a96c v3 pages have page titles (#1582)
* Adds tasks page title

* Adds page titles to the <head>
2025-01-21 12:07:32 +00:00
Eric Allam e1497c802d Update config docs for new telemetry property (#1610) 2025-01-20 10:29:57 +00:00
Eric Allam e2612224b4 Fix "crypto is not defined error" on Node.js 18 in dev (#1623)
* Add --experimental-global-webcrypto node option fix "crypto is not defined error" on Node.js 18 in dev

* Only add flag when on node 18

* Missed the function
2025-01-20 10:29:26 +00:00
Matt Aitken 0d38ea0feb Updated the batch REST API docs to the new endpoint 2025-01-17 13:28:02 +00:00
Eric Allam 0687ce722c Release 3.3.11 (#1621)
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 4s
🚀 Publish Trigger.dev Docker / units (push) Failing after 4s
🚀 Publish Trigger.dev Docker / publish-webapp (push) Has been skipped
🚀 Publish Trigger.dev Docker / publish-worker (push) Has been skipped
@trigger.dev/react-hooks@3.3.11 @trigger.dev/build@3.3.11 @trigger.dev/core@3.3.11 @trigger.dev/rsc@3.3.11 @trigger.dev/sdk@3.3.11 trigger.dev@3.3.11 v.docker.3.3.11
2025-01-17 12:06:41 +00:00
github-actions[bot] d627fa718e chore: Update version for release (#1611)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-17 12:05:15 +00:00