Commit Graph

6111 Commits

Author SHA1 Message Date
Matt Aitken 5597291380 Schedules list performance (#1938)
* Order the schedules: most recent first

* TaskSchedule dashboard speed indexes
2025-04-17 15:05:50 +01:00
Matt Aitken 5c9610b807 The mini task page graphs were missing Timed out and Expired (#1915) 2025-04-17 15:05:37 +01:00
Himanshu Sharma e0fd06490a maintain proper context in metadata.root and parent getters (#1917)
* fix(TRI-5140): maintain proper context in metadata.root and parent getters

* Create two-tigers-dream.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2025-04-17 15:04:01 +01:00
Matt Aitken 33e7b6865a Set env vars to be "secret" (#1923)
* WIP on secret env vars

* Editing individual env var values is working

* Sort the env vars by the key

* Deleting values

* Allowing setting secret env vars

* Added medium switch style

* Many style changes to the env var form

* “Copy text” -> “Copy”

* Draw a divider between hidden buttons

* Env var tweaks

* Don’t show Dev:you anymore

* Grouping the same env var keys together

* Styles improved

* Improved styling of edit panel

* Fix bun detection, dev flushing, and init command (#1914)

* update nypm to support text-based bun lockfiles

* add nypm changeset

* handle dev flushing failures gracefully

* fix path normalization for init.ts

* add changesets

* chore: remove pre.json after exiting pre mode

* init command to install v4-beta packages

* Revert "chore: remove pre.json after exiting pre mode"

This reverts commit f5694fde9314114c74a220c2213d19667bca1a6c.

* make init default to cli version for all packages

* Release 4.0.0-v4-beta.1 (#1916)

* chore: Update version for release (v4-beta)

* Release 4.0.0-v4-beta.1

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: nicktrn <55853254+nicktrn@users.noreply.github.com>

* Both run engines will only lock to versions they can handle (#1922)

* run engine v1 will only lock to v1 deployments

* run engine v2 will only lock to managed v2 deployments

* test: create background worker and deployment with correct engine version

* Add links to and from deployments (#1921)

* link from deployments tasks to filtered runs view

* jump to deployment

* don't add version links for dev (yet)

* Fix current worker deployment getter (#1924)

* only return last v1 deployment in the shared queue consumer

* be explicit about only returning managed deployments

* Add a docs page for the human-in-the-loop example project (#1919)

* Add a docs page for the human-in-the-loop example project

* Order guides, example projects and example tasks alphabetically in the docs list

* Managed run controller revamp (#1927)

* update nypm to support text-based bun lockfiles

* fix retry spans

* only download debug logs if admin

* add nypm changeset

* pull out env override logic

* use runner env gather helper

* handle dev flushing failures gracefully

* fix path normalization for init.ts

* add logger

* add execution heartbeat service

* add snapshot poller service

* fix poller

* add changesets

* create socket in constructor

* enable strictPropertyInitialization

* deprecate dequeue from version

* start is not async

* dependency injection in prep for tests

* add warm start count to all controller logs

* add restore count

* pull out run execution logic

* temp disable pre

* add a controller log when starting an execution

* refactor execution and squash some bugs

* cleanup completed docker containers by default

* execution fixes and logging improvements

* don't throw afet abort cleanup

* poller should use private interval

* rename heartbeat service file

* rename HeartbeatService to IntervalService

* restore old heartbeat service but deprecate it

* use the new interval service everywhere

* Revert "temp disable pre"

This reverts commit e03f4179de6a731c17253b68a6e00bcb7ac1736b.

* add changeset

* replace all run engine find uniques with find first

* Release 4.0.0-v4-beta.2 (#1928)

* chore: Update version for release (v4-beta)

* Release 4.0.0-v4-beta.2

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: nicktrn <55853254+nicktrn@users.noreply.github.com>

* Remove batch ID carryover for non-batch waits (#1930)

* add failing test case

* do not carry over previous batch id when blocking with waitpoint

* delete irrelevant test

* Delete project (#1913)

* Delete project

- Don’t schedule tasks if the project is deleted
- Delete queues from the master queues
- Add the old delete project UI back in

* Mark the project as deleted last

* Fix for overriding local variable

* Added a todo for deleting env queues

* Remove todo

* Improve usage flushing (#1931)

* add flush to global usage api

* enable controller debug logs

* initialize usage manager after env overrides

* add previous run id to more debug logs

* add changeset

* For secret env vars, don’t return the value

* Added a new env var repository function for getting secrets with redactions

* Test task for env vars

* Delete heartbeat file, merge mess up

---------

Co-authored-by: nicktrn <55853254+nicktrn@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Saadi Myftija <saadi.myftija@gmail.com>
2025-04-17 14:39:09 +01:00
Matt Aitken 1b758bd894 Only prevent triggering runs if the parent is completed AND it’s a triggerAndWait (#1935) 2025-04-17 14:25:20 +01:00
Eric Allam e501113a73 fix: refill release concurrency token bucket queue when runs resume before checkpoints are created (#1933)
* fix: refill release concurrency token bucket queue when runs resume before checkpoints are created

* Fix the engine package.json tests

* Remove log
2025-04-16 20:18:38 +01:00
github-actions[bot] 543540581d Release 4.0.0-v4-beta.3 (#1932)
* chore: Update version for release (v4-beta)

* Release 4.0.0-v4-beta.3

---------

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.3 @trigger.dev/build@4.0.0-v4-beta.3 @trigger.dev/core@4.0.0-v4-beta.3 @trigger.dev/react-hooks@4.0.0-v4-beta.3 @trigger.dev/redis-worker@4.0.0-v4-beta.3 @trigger.dev/rsc@4.0.0-v4-beta.3 @trigger.dev/sdk@4.0.0-v4-beta.3 trigger.dev@4.0.0-v4-beta.3
2025-04-16 19:57:42 +01:00
nicktrn 8b182ce8cb Fix stalled run detection (#1934)
* drive run heartbeats from child process

* track last heartbeat

* add changeset

* use v4-specific heartbeat interval env var and decrease to 20s

* delete old heartbeat service

* remove heartbeat handler during execution cleanup
2025-04-16 19:48:51 +01:00
nicktrn 1f6a283ddf Improve usage flushing (#1931)
* add flush to global usage api

* enable controller debug logs

* initialize usage manager after env overrides

* add previous run id to more debug logs

* add changeset
2025-04-16 14:34:20 +01:00
Matt Aitken 10f78cbad4 Delete project (#1913)
* Delete project

- Don’t schedule tasks if the project is deleted
- Delete queues from the master queues
- Add the old delete project UI back in

* Mark the project as deleted last

* Fix for overriding local variable

* Added a todo for deleting env queues

* Remove todo
2025-04-16 13:31:22 +01:00
nicktrn 2957ee9af9 Remove batch ID carryover for non-batch waits (#1930)
* add failing test case

* do not carry over previous batch id when blocking with waitpoint

* delete irrelevant test
2025-04-16 11:01:09 +01:00
github-actions[bot] bcef9696e8 Release 4.0.0-v4-beta.2 (#1928)
* chore: Update version for release (v4-beta)

* Release 4.0.0-v4-beta.2

---------

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.2 @trigger.dev/build@4.0.0-v4-beta.2 @trigger.dev/core@4.0.0-v4-beta.2 @trigger.dev/react-hooks@4.0.0-v4-beta.2 @trigger.dev/redis-worker@4.0.0-v4-beta.2 @trigger.dev/rsc@4.0.0-v4-beta.2 @trigger.dev/sdk@4.0.0-v4-beta.2 trigger.dev@4.0.0-v4-beta.2
2025-04-15 16:19:04 +01:00
nicktrn 3f97cf4a6b Managed run controller revamp (#1927)
* update nypm to support text-based bun lockfiles

* fix retry spans

* only download debug logs if admin

* add nypm changeset

* pull out env override logic

* use runner env gather helper

* handle dev flushing failures gracefully

* fix path normalization for init.ts

* add logger

* add execution heartbeat service

* add snapshot poller service

* fix poller

* add changesets

* create socket in constructor

* enable strictPropertyInitialization

* deprecate dequeue from version

* start is not async

* dependency injection in prep for tests

* add warm start count to all controller logs

* add restore count

* pull out run execution logic

* temp disable pre

* add a controller log when starting an execution

* refactor execution and squash some bugs

* cleanup completed docker containers by default

* execution fixes and logging improvements

* don't throw afet abort cleanup

* poller should use private interval

* rename heartbeat service file

* rename HeartbeatService to IntervalService

* restore old heartbeat service but deprecate it

* use the new interval service everywhere

* Revert "temp disable pre"

This reverts commit e03f4179de6a731c17253b68a6e00bcb7ac1736b.

* add changeset

* replace all run engine find uniques with find first
2025-04-15 16:08:51 +01:00
Saadi Myftija 0b2eb34ea6 Add a docs page for the human-in-the-loop example project (#1919)
* Add a docs page for the human-in-the-loop example project

* Order guides, example projects and example tasks alphabetically in the docs list
2025-04-14 20:49:47 +01:00
nicktrn 1816115f0f Fix current worker deployment getter (#1924)
* only return last v1 deployment in the shared queue consumer

* be explicit about only returning managed deployments
2025-04-14 14:55:27 +01:00
nicktrn 5f4c6071d8 Add links to and from deployments (#1921)
* link from deployments tasks to filtered runs view

* jump to deployment

* don't add version links for dev (yet)
2025-04-14 14:43:52 +01:00
nicktrn faf5d01b2c Both run engines will only lock to versions they can handle (#1922)
* run engine v1 will only lock to v1 deployments

* run engine v2 will only lock to managed v2 deployments

* test: create background worker and deployment with correct engine version
2025-04-13 21:51:42 +01:00
github-actions[bot] 1d920d5b3f Release 4.0.0-v4-beta.1 (#1916)
* chore: Update version for release (v4-beta)

* Release 4.0.0-v4-beta.1

---------

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/build@4.0.0-v4-beta.1 @trigger.dev/core@4.0.0-v4-beta.1 @trigger.dev/python@4.0.0-v4-beta.1 @trigger.dev/react-hooks@4.0.0-v4-beta.1 @trigger.dev/redis-worker@4.0.0-v4-beta.1 @trigger.dev/rsc@4.0.0-v4-beta.1 @trigger.dev/sdk@4.0.0-v4-beta.1 trigger.dev@4.0.0-v4-beta.1
2025-04-11 20:19:03 +01:00
nicktrn cc553d3392 Fix bun detection, dev flushing, and init command (#1914)
* update nypm to support text-based bun lockfiles

* add nypm changeset

* handle dev flushing failures gracefully

* fix path normalization for init.ts

* add changesets

* chore: remove pre.json after exiting pre mode

* init command to install v4-beta packages

* Revert "chore: remove pre.json after exiting pre mode"

This reverts commit f5694fde9314114c74a220c2213d19667bca1a6c.

* make init default to cli version for all packages
2025-04-11 20:11:13 +01:00
Dan adbc7b44c7 Added examples to the intro table and updated react email (#1878)
* Updated intro list and added task coe

* Fixed import name
2025-04-11 14:12:31 +01:00
Dan e7afc5cfee Updated vercel synv env vars example (#1911)
* Added accesstoken / projectId / vercelTeamId

* Moved v4 upgrade up
2025-04-11 13:54:32 +01:00
Dan 31b06ba5e1 Added ‘defaultIntegrations: false’ to the sentry docs (#1889) 2025-04-11 13:53:56 +01:00
nicktrn 63a221abd0 Only include v4 debug logs for admins (#1910)
* fix retry spans

* only download debug logs if admin
2025-04-11 09:07:51 +01:00
Matt Aitken 030c8ae510 Don't show queue time in the run timeline by default (#1909)
* WIP on hiding the queued time

* Fix for position/sizes of spans

* Fix for duration squashing

* Tweaked some styles on the timeline

* Fix for retry spans appearing in the wrong place

* Added “Q” shortcut key

* Fix for in progress span durations
2025-04-10 16:37:39 +01:00
Eric Allam 61232abd8e docs: Upgrade to v4 guide (#1873)
* WIP upgrade to v4 docs

* WIP

* Upgrade to v4 docs

* Add wait for token docs and improve upgrade guide

* Added known issues to upgrade guide, and moved the migration section higher up

* Update to say "There are no known issues at the moment.”

* Docs upgrade guide package version. Need to use exact packages for the CLI to work

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2025-04-09 17:04:08 +01:00
nicktrn e714f3262a Release 4.0.0-v4-beta.0 (#1907)
* fix package versions in references

* update lockfile
@trigger.dev/build@4.0.0-v4-beta.0 @trigger.dev/core@4.0.0-v4-beta.0 @trigger.dev/python@4.0.0-v4-beta.0 @trigger.dev/react-hooks@4.0.0-v4-beta.0 @trigger.dev/redis-worker@4.0.0-v4-beta.0 @trigger.dev/rsc@4.0.0-v4-beta.0 @trigger.dev/sdk@4.0.0-v4-beta.0 trigger.dev@4.0.0-v4-beta.0
2025-04-09 16:12:36 +01:00
github-actions[bot] b949b5d257 chore: Update version for release (v4-beta) (#1755)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-09 16:07:14 +01:00
Eric Allam bc8901dbf1 chore: configure changesets to enter prerelease mode on v4-beta tag (#1869)
* Add major v4 changeset

* Enter v4 prerelease mode in changesets

* Use v4-beta tag instead of v4
2025-04-09 15:55:34 +01:00
nicktrn 98a3cfbfa1 Clear runner state of previous executions before warm starts (#1905)
* attach all run controller logs to the run

* make controller-level pre-suspend wait duration configurable

* snapshot status should remain EXECUTING for short retry delays

* add suspended process error

* ensure clean slate before waiting for next run

* treat immediate retries as warm starts

* fix for finished runs waiting forever
2025-04-09 15:53:42 +01:00
Matt Aitken db97f80646 Fix for queue indexing not updating concurrencyLimit/removing it (#1906) 2025-04-09 15:53:21 +01:00
James Ritchie 8382274402 Fixes a padding issue on the org menu dropdown (#1903) 2025-04-09 14:00:57 +01:00
nicktrn ebb71932f9 snapshot status should remain EXECUTING for short retry delays (#1902) 2025-04-09 13:23:39 +01:00
James Ritchie f12141b307 Removes hard coded “5” from “5 related runs” in the waitpoint token inspector (#1901) 2025-04-09 12:21:11 +01:00
Matt Aitken 3ce6144339 Added the Attempt span error back (and properties) (#1900) 2025-04-08 22:45:11 +01:00
Matt Aitken 3cbbece473 Run completed at fix and engine API rate limit whitelist (#1899)
* Use completedAt instead of updatedAt

* Disable verbose SSE logs

* Engine rate limiter: whitelist engine worker-actions

* Show the compute column in the runs table

* The compute column should be invocation + compute cost
2025-04-08 20:55:35 +01:00
Matt Aitken 79d6044dd0 Added engine worker immediatePollIntervalMs and limit env vars (#1898) 2025-04-08 15:39:44 +01:00
nicktrn 72d98778eb Fix node options and OOM retries (#1897)
* don't hardcode max old space size in deployment images

* flags: treat underscores as hyphens

* append attempt number to runner name if >1

* improve retry spans for oom errors
2025-04-08 13:07:45 +01:00
Matt Aitken a51b9b9f98 Fix: custom queue releaseConcurrencyOnWaitpoint. (#1896)
* Make sure releaseConcurrencyOnWaitpoint is set on taskQueue

* Allow task queue to have releaseConcurrencyOnWaitpoint (required to fix custom queues)

* Test for releaseConcurrencyOnWaitpoint

* Added a warning if you use the same queue twice with different settings

* Improved the error some more
2025-04-08 12:32:22 +01:00
Logan Mimaroglu 9d261f4986 Update atomic-deployment.mdx (#1895) 2025-04-08 10:08:31 +01:00
nicktrn fa0e2bf17c Fix v4 build workflow (#1894) 2025-04-07 17:34:07 +01:00
Matt Aitken 56a880f1bd Fix dequeue snapshot batch ids (#1893)
* Pass the batchId through from previous snapshots when dequeuing

* Fix and test for resuming batch after checkpoint
2025-04-07 17:22:56 +01:00
James Ritchie b322cf1eda Fix for long file names wrapping instead of truncating on the RunTimeline (#1891) 2025-04-07 16:36:22 +01:00
James Ritchie 86e56144c0 Adds selected state for waitpoint table rows (#1892) 2025-04-07 16:35:58 +01:00
Matt Aitken fc0a331c42 We weren’t copying the batch info when suspending a run (#1890) 2025-04-07 16:00:07 +01:00
nicktrn a9d5646d75 Very short waits count towards compute usage (#1888)
* add duration wait threshold

* improve wording

* Updates the wait overview, wait.for and wait.until pages copy to better explain compute costs

---------

Co-authored-by: James Ritchie <james@trigger.dev>
2025-04-07 14:52:33 +01:00
Matt Aitken 32d2992802 Security update of nanoid from 3.3.4 to 3.3.8 (#1887) 2025-04-07 13:56:37 +01:00
Himanshu Sharma e546028e9b upgrade nanoid to latest version (#1886) 2025-04-07 11:31:06 +01:00
nicktrn 58567bfe44 Add v4 timeline metrics to prod runs (#1884)
* set correct worker name on create

* dev: kill run process on failed cancel attempt

* add missing prod timeline events

* add more debug logs after api call failures

* import events are always visible

* set dequeued at on new runners

* skip fork event test

* fix timeline test for import event
2025-04-04 18:39:13 +01:00
Eric Allam e7bca6fa1b fix: release concurrency system only consumes tokens when releasings are executed successfully (#1883)
* fix: release concurrency system only consumes tokens when releasings are executed successfully

* Add release concurrency metrics sending to otel
2025-04-04 17:20:33 +01:00
Matt Aitken 195c5d758b Update the path for the subcription portal (#1885) 2025-04-04 17:15:07 +01:00