Commit Graph

5571 Commits

Author SHA1 Message Date
Eric Allam b3a6f4e0ac Release 3.0.5
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 0s
🚀 Publish Trigger.dev Docker / units (push) Failing after 0s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
🚀 Publish Trigger.dev Docker / publish-infra (push) Has been skipped
@trigger.dev/build@3.0.5 @trigger.dev/sdk@3.0.5 trigger.dev@3.0.5 v.docker.3.0.5 @trigger.dev/core@3.0.5
2024-09-18 22:08:45 +01:00
github-actions[bot] a538fa879f chore: Update version for release (#1322)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-18 22:07:50 +01:00
Eric Allam 3b15224453 Fix default machine preset in config not being used (#1321)
* Add additional error message and stack trace when a task file cannot be imported for run

* Apply default machine preset in config
2024-09-18 22:00:59 +01:00
nicktrn d8006e15ac Prevent abort signals from causing uncaught exceptions (#1320)
* never abort the same controller twice

* prevent uncaught exception when aborting pipe

* abort signal assertions and more logging

* never abort running pipe
2024-09-18 19:18:00 +01:00
nicktrn f89d93b905 Update self-hosting docs for switch to latest 2024-09-18 18:33:26 +01:00
Eric Allam 2dbf550a70 Release 3.0.4
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 19s
🚀 Publish Trigger.dev Docker / units (push) Failing after 20s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
🚀 Publish Trigger.dev Docker / publish-infra (push) Has been skipped
@trigger.dev/build@3.0.4 @trigger.dev/core@3.0.4 @trigger.dev/sdk@3.0.4 trigger.dev@3.0.4 v.docker.3.0.4
2024-09-18 17:31:03 +01:00
github-actions[bot] 0ac7f4b24b chore: Update version for release (#1318)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-18 17:28:59 +01:00
nicktrn 8d1e41693a v3: self-hosting support for latest packages (#1319)
* display --profile flag after init if used

* add containerfile debug logs

* log all indexing errors in case of connection issues

* specify dockerfile syntax version

* add network flag for self-hosting

* move all self-hosting tags to latest

* add self-hosting update section

* manual setup subsection

* registry flag implies push

* add changeset
2024-09-18 17:07:47 +01:00
Eric Allam 4adc773c77 Auto-resolve payload/output presigned urls when retrieving a run with runs.retrieve (#1317) 2024-09-18 15:20:02 +01:00
Matt Aitken b5cdb0c855 Better logging when resuming with pause and no checkpoint 2024-09-18 13:55:59 +01:00
Eric Allam 7652d8e131 Release 3.0.3 @trigger.dev/build@3.0.3 @trigger.dev/core@3.0.3 trigger.dev@3.0.3 @trigger.dev/sdk@3.0.3 2024-09-18 11:27:31 +01:00
Matt Aitken ce89925176 RESUME_AFTER_DEPENDENCY_WITH_ACK: any successful responses = success
Also added a backoff if the catch is hit, and log the error out
2024-09-18 11:26:33 +01:00
github-actions[bot] 33c108b739 chore: Update version for release (#1316)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-18 11:22:16 +01:00
Dan 382ce8daff Added overview pages for guides and examples, and improved examples (#1314)
* Added introduction page for guides

* New intro page for examples

* Fixed links

* Updated examples intro to include all of the new ones

* Improved FFmpeg example

* Improved the react pdf example

* Added Supabase overview page

* Updated card-supabase snippet

* Added sharp payload instructions

* Added vercel payload instructions

* Added dall-e payload instructions

* Added openai payload instructions

* Added resend payload instructions

* Made the prompts more consistent

* Minor tweaks and moved bun

* Updated links and added bun logo

---------

Co-authored-by: James Ritchie <james@jamesritchie.co.uk>
2024-09-18 11:08:55 +01:00
Eric Allam 3d53d4c086 Improve the update CLI command and fix missing tsconfig.json error (#1315)
* Fixes for CLI update command, and make the hide the "whoami" command output when running in dev

* Fix an issue where a missing tsconfig.json file would throw an error on dev/deploy

* Don’t show latest CLI warning when using a prerelease

* Only print CLI update required message when update is embedded

* Strip out TRIGGER\_ keys when using syncEnvVars, to prevent deploy errors
2024-09-18 11:07:09 +01:00
Matt Aitken 56a5b58849 Add acking to RESUME_AFTER_DEPENDENCY message to the coordinator (#1313)
* Fix for run filtering not working with some special characters (double encoded)

* Add the full dependentTaskAttempt to a ResumeBatchRunService log

* Added RESUME_AFTER_DEPENDENCY_WITH_ACK

* Set the delay to 5s

* If a checkpoint has been created, the coordinator won’t continue the run with RESUME_AFTER_DEPENDENCY_WITH_ACK

* If we’re keeping the run alive then set socket.data.requiresCheckpointResumeWithMessage to undefined

* Log out the data before and after setting socket.data.requiresCheckpointResumeWithMessage
2024-09-18 10:29:55 +01:00
Eric Allam 74c2076262 A couple of docs fixes 2024-09-17 20:27:17 +01:00
Dan a84e601da8 Added new example tasks (FFmpeg / Sharp / Vercel AI SDK) (#1312)
* Added FFmpeg / sharp / vercel and updated mint.json

* Amends including s3 -> r2
2024-09-17 14:16:10 +01:00
nicktrn 9a3eab5ac4 v3: docs improvements (#1302)
* pull out common cli options

* lint commands table

* update dev command link

* add undefined Crypto section

* add self-hosting section to github actions docs

* add cli usage section to self-hosting docs

* add skip telemetry env var to cli option docs

* add api url env var to cli options docs

* lowercase cli commands in sidebar

* add self-hosting beta notice

* update beta to latest tag on electric route

* add deploy command examples section

* fix env file option

* reorder deploy options sections

* cli docs fixes
2024-09-17 11:40:25 +01:00
Eric Allam 616eb55b0d Release 3.0.2 @trigger.dev/build@3.0.2 @trigger.dev/core@3.0.2 @trigger.dev/sdk@3.0.2 trigger.dev@3.0.2 2024-09-17 10:45:39 +01:00
github-actions[bot] b6b74046b9 chore: Update version for release (#1310)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-17 10:44:51 +01:00
Eric Allam 282df76392 Enable changesets creating a github release 2024-09-17 10:38:58 +01:00
Eric Allam 2b5771f38c Remove duplicate bin definition, fixes issue #1311 2024-09-16 21:40:01 +01:00
Eric Allam de135e4885 Fix for TASK_RUN_HEARTBEAT errors in deployed and dev works 2024-09-16 19:10:19 +01:00
Eric Allam 00668ff39d Release 3.0.1 @trigger.dev/build@3.0.1 @trigger.dev/sdk@3.0.1 trigger.dev@3.0.1 @trigger.dev/core@3.0.1 2024-09-16 18:14:28 +01:00
github-actions[bot] 499fd86cf2 chore: Update version for release (#1309)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-16 18:11:20 +01:00
Eric Allam 3aa5811790 fix 3.0.0 update warning (#1308)
* Attempt to fix false package mismatch warnings

* Add changeset

* Add ability to test update checks in prerelease packages

* Resolve the trigger.dev package based on the package.json dir

* Try this

* Don’t use the version module, just resolve the packageJson

* One more dirname

* Comment

* Remove the version export because we aren’t using it anymore
2024-09-16 18:03:16 +01:00
Matt Aitken 94698ad13c Added JobRun eventId index 2024-09-16 16:54:39 +01:00
Eric Allam 798a47e863 Release v3.0.0 @trigger.dev/build@3.0.0 @trigger.dev/sdk@3.0.0 trigger.dev@3.0.0 @trigger.dev/core@3.0.0 2024-09-16 15:38:05 +01:00
github-actions[bot] 45287cd655 chore: Update version for release (#1269)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-16 15:37:20 +01:00
Eric Allam cf13fbdf32 Updating docs for the move from beta -> latest (with new build system) (#1299)
* Add triggerAndWait().unwrap() to more easily get at the output or throw the subtask error

* Add taskId and runId to SubtaskUnwrapError

* WIP docs update beta -> latest

* trigger.dev init now adds @trigger.dev/build to devDependencies

* How it works doc

* Restructure some docs and update the cli commands

* Config file docs, plus aptGet and ffmpeg extensions

* Update to latest from beta docs

* Add runtime to templates

* Add --runtime option to the init CLI command

* A bunch more doc updates after feedback

* Document triggerAndWait with unwrap and result types

* beta -> latest in the webapp

* CLI update check no longer references beta

* Add major release

* Leave changeset beta, back to normal package release

* Fixed default dirs option in init command

* exclude windows-yarn variation of cli e2e tests because it’s buggy

* Remove cache to try and fix yarn e2e test workflow errors
2024-09-16 15:30:32 +01:00
Matt Aitken c738ef39cb Fix for runs.list with from/to Date or timestamp 2024-09-16 15:15:34 +01:00
Eric Allam ca2cb7298c Another attempt at fixing the yarn CI failure 2024-09-16 15:13:19 +01:00
Niels 55b7ffeb72 Don't run release workflow on mdx changes (#1304) 2024-09-15 11:24:35 +01:00
Jacob Paris cfe0abd95e Update remix examples (#1303)
* Update remix examples

* fix: remove trailing space
2024-09-15 11:10:01 +01:00
James Ritchie c1690bd1ae New React to PDF example task (#1300)
* Better code snippet to clarify your framework

* New page for react-pdf

* Added 3 more examples

* New react to PDF example

* Alphabeticalise the side menu

* Removed github link and tweaked title
2024-09-13 16:46:52 +01:00
Matt Aitken 9a7ad926aa ElectricSQL run page (hidden page for now) (#1297)
* WIP on using react-window-splitter

* WIP with new resizable panels and SSR

* Use the cookie package

* Resizable storybook page

* Increase indexing memory limit

* Fixed v2 usage meter displaying when on paid plan (#1255)

* Fixed v2 usage meter displaying when on paid plan

* Show the free usage panel only for v3 projects

* Concurrency page and more accurate tracking (#1252)

* Initial TaskRunConcurrencyTracker implementation

* MARQS calls a subscriber to events

* When enqueuing add the extra required metadata

* Track concurrency per environment for tasks too

* Admin page for global concurrency

* Use the new concurrency tracker on the tasks page

* Useful performance test task

* getAllTaskIdentifiers()

* New page for concurrency

* BackgroundWorkerTask index for quick lookup of task identifiers

* Added a way to get concurrency for environments

* Added upgrade/request more concurrency button

* Queued task column working

* Use defer and suspense

* Added queue column to the concurrency environments table

* Some comments added for clarity

* Fixed bad log message

* Sidemenu: move lower and rename to “Concurrency limits”

* Only show the environments, not tasks. Renamed to “Concurrency limits”

* v3: fix unfreezable state crashes for runs with multiple waits (#1253)

* support named capture groups

* write crash errors to attempt.error

* make restored pod names unique per checkpoint

* use last eight characters of checkpoint id instead

* add more chaos monkey env vars

* Ignore unfreezable states

* prevent excessive queue config parsing errors

* handle dependency resume edge case

* better entry point logging

* ignore checkpoint cancellation timeouts

* add missing idempotency keys to wait for dep replays

* remove checkpoints between attempts

* fix retry container names on kubernetes

* add changeset

* fix types

* bring back internal duration timers

* Added more logging to TaskRunConcurrencyTracker and some more try/catches

* Call subscriber.messageDequeued in dequeueMessageInSharedQueue

* Added messageReplaced to concurrency tracking (when freezing)

* Added depenenciesToBundle guide to bundle all packages

* Include the old message data when replacing, so we get the projectId etc.

* Fix restored container names

* Fix for schedule page not scrolling

* Added a description panel to the Concurrency admin page

* chore: Update version for release (beta) (#1256)

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

* Release 3.0.0-beta.53

* Added a note to use batchTrigger() instead of trigger()

* The latest react-window-splitter fixes the ESM issues

* Set sensible defaults for the run page

* Deployments page

* Test page

* Schedules page

* Latest version of react-window-splitter (0.2.5)

* Updated to the latest version: react-window-splitter

* Callout if runs don’t start right away now has some top margin

* Small padding fix

* styled the handle focus state

* Added isStaticAtRest prop to resizable panel

* Updated resizable storybook

* Inline code blocks behave nicer when text wraps

* Added ElectricSQL to docker-compose, available on 3060

* Extracted some logic out of the eventRepository for getting a trace. This will be used on the frontend

* Use the new util

* More restructuring ready to use the trace summary from the frontend

* Using ElectricSQL for the run page data

* Min size for resizable panel on test page

* Don’t load the trace in the RunPresenter anymore

* Fix for the resizable panels on the run page

* Added overflow hidden to the panel group

* min size for the test page left hand panel

* Updated to latest window-splitter version

* Removed unused const

* One fix for client-server mismatch

* Slight improvement in the loading state

* Restructured the page so the loading is better

* Improvement to the loading states

* Improved the loading behaviour with the inspector

* WIP on auth, having problems with it

* Upgrade Remix to 2.9.1 (same as PR #1096)

* Switched structure around again so we only call the useTrace hook from the client

* Added auth to the sync

* Overscan more rows in the tree view

* Fix for TS error

* Remove duplicate import

* Revert "Upgrade Remix to 2.9.1 (same as PR #1096)"

This reverts commit e63ee9e924.

* save cookie only when id is used

* Deployment table now scrolls

* removed imports

* A lot of changes to make the inspector live too… WIP

* More major overhauls to get the synced version of the run page working…

* If a span is completed show that

* Set the debounce much lower for selecting the span view

* Load the details run inspector data on demand

* Delete the SpanPresenter

* Use the async payload because it deals with superjson

* Fixed weird merge conflict

* Share some inspector timeline components

* A couple of layout tweaks

* Improved the run inspector loading states

* Fix for paragaph errors

* Fix for focusing on a span

* Undefined typre for useSyncedShape

* ELECTRIC_ORIGIN env var doesn’t have a default, added to the examples

* Updated @electric-sql/react package to the latest

* Fix the timeline duration stretching

* Added some better error handling for the electric sync

* More logging

* Better error when there are bad responses

* Turn off resizable snapshots, there’s a bug

* Added getSpan back

* Added SpanPresenter back

* Updated to the new Electric hooks package

* Made a copy so we have the old run page and the new electric one

* Put the main eventRepository back for now

---------

Co-authored-by: nicktrn <55853254+nicktrn@users.noreply.github.com>
Co-authored-by: James Ritchie <james@trigger.dev>
Co-authored-by: James Ritchie <james@jamesritchie.co.uk>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-13 11:45:24 +01:00
Matt Aitken a66db33dee If there’s no attempt and no worker when finalizing a run, don’t try to create an attempt 2024-09-12 15:08:37 +01:00
Matt Aitken f90e23d503 Fix so failed cancels in the dashboard redirect back with an error message 2024-09-12 15:08:06 +01:00
Matt Aitken 0cc56040f3 batchTriggerAndWait checkpoint race condition when at max concurrency (#1296)
* Ignore /packages/cli-v3/src/package.json

* Added more logs when resuming a dependency, added the runId

* A task for reproducing a race condition with checkpoints

* Fix for doing remote image build when not self-hosting

* Set team members, alerts and schedule limits to 100m for self-hosting

* Import fix

* Set the checkpointEventId in marqs when the checkpoint is created for batchTriggerAndWait

This should fix a horrible race condition when at max concurrency
2024-09-12 14:27:42 +01:00
Eric Allam 67547d2521 Remove payload from task run task events 2024-09-12 14:12:16 +01:00
Eric Allam a50063ce04 Always insert the dirs option when initializing a new project in the trigger.config.ts 2024-09-12 14:12:16 +01:00
Eric Allam 8c690a960c Make sure BuildManifest is exported from @trigger.dev/build 2024-09-12 14:12:16 +01:00
D-K-P 511a24b9f3 Supabase docs improvements 2024-09-12 11:28:46 +01:00
Dan 7ca2b628f7 Added tutorial docs and images (#1295) 2024-09-12 10:10:51 +01:00
James Ritchie 9c61a25402 Docs/task examples (#1293)
* WIP first example task guide

* Added example link to github repo

* Created a top level Examples docs section

* Renamed side menu to examples for now
2024-09-11 17:37:49 +01:00
James Ritchie 972b5e34b8 Docs/more improvements (#1292)
* WIP creating a CLI section

* WIP adding more CLI commands in a new section

* New CLI section with introduction and more CLI commands

* More improvement to the CLI options

* Each CLI command has its own page

* fixed broken links

* Removed outdated copy
2024-09-11 17:14:39 +01:00
Eric Allam 47ca24aab8 Update new build sytem docs 2024-09-11 15:57:22 +01:00
Eric Allam 8578c9b281 v3: new build system fixes round 2 (#1283)
* Fixed empty env vars overriding in dev runs

* Don’t import package.json anymore

* fix node10 moduleResolution in @trigger.dev/core

* Support self-hosters pushing to a custom registry when running deploy

* dev: Fixed stuck runs when a child run fails with a process exit

* Make some doc notes about known issues and docker hub private repos

* Fix --project-ref when running deploy

* Fix —config option when deploying

* Fixing the flushing/killing process with the new build system

* Add monorepo-react-email e2e test fixture

* Fix issue with emitDecoratorMetadata and tsconfigs with extends

* Got the emit decorator metadata fixture working

* Fixed typechecking yarn e2e CLI tests in monorepos

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

* Remote externals now powered by JSON Hero to be easier to update

* resolve config source files

* Add a —javascript option to init, defaults to typescript

* Add support for prisma typed sql

* Remove msw and retry.interceptFetch

* Add missing code to the openai retries example

* Don’t generate the v3 catalog prisma client during CI

* Fixed v3-catalog task imports

* Remove interceptor usage in task file

* Only import import-in-the-middle hook if there are instrumented packages

* Fix yarn.lock file
2024-09-11 15:48:20 +01:00
Matt Aitken 8bb81ec73f The usage tasks table was showing double all values if you had a staging env… 🤦‍♂️ 2024-09-11 11:39:08 +01:00