Commit Graph

1230 Commits

Author SHA1 Message Date
github-actions[bot] 8e61f5d631 chore: Update version for release (#1378)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-04 14:59:07 -07:00
Eric Allam 6d0884254e feat: Add maxDuration to tasks (#1377)
* WIP

* Get max duration working on deployed runs

* Actually set the timed out runs to status = TIMED_OUT

* The client status for TIMED_OUT is now MAX_DURATION_EXCEEDED

* New TimedOutIcon

* Added new timedout icon

* Add ability to opt-out of maxDuration with timeout.None

* MAX_DURATION_EXCEEDED -> TIMED_OUT

* changeset

* Improved styling for the status tooltip content

---------

Co-authored-by: James Ritchie <james@trigger.dev>
2024-10-03 12:43:26 -07:00
Eric Allam 1ff7b861ca Add max queue depth limits (#1376)
* Add runs to an env queue, as well as the actual queue

* Add queue size limit guard on triggering tasks
2024-10-02 18:26:36 -07:00
github-actions[bot] a6ea8444c9 chore: Update version for release (#1366)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-29 19:17:26 -07:00
Eric Allam 4c1ee3d6ea fix: run metadata not working when using npx/pnpm dlx 2024-09-29 19:09:38 -07:00
James Ritchie 4906fe9cf0 Run page links to tasks & replay run modal improvements (#1364)
* Removed the inline-code accessory from the logs when calling trigger or batchTrigger from a run

* Removed re2 from the v3 catalog

* Added a Root badge to the runs list

* Keep the side panel open when switching tasks & remove links from detail panel

* Root and parent task styling inspector

* Hide the root badge if the task isn’t the root

* margin between the dev not running message

* improved spacing of items

* Improved Root badge style

* Show a table of triggered runs in the inspector

* Add parentSpanId index to the TaskRun table

* Fix for the run inspector now opening when linked from another run/replay

* Triggered runs table has a max height

* Added a description to the replay run modal and improved the styling slightly

* Only include a bottom border when the triggered run table is more than 4 items

* Improved the triggered runs table borders

* Improved the tables so they can have an optional sticky header

* Added table types to storybook

* Fix for hover states on different backgrounds & runs table select cell
2024-09-27 12:14:44 +01:00
github-actions[bot] 926459893b chore: Update version for release (#1351)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-26 14:33:30 +01:00
Eric Allam eda348226d Store seed metadata separately to use in test UI and when replaying a run 2024-09-26 10:47:35 +01:00
Eric Allam 3c492bc202 feat: Run metadata (#1357)
* Run metadata

* Remove metadata from context, move it to it’s own tab

* More run metadata stuff

- Add metadata to testing
- Make using metadata outside of runs a no-op
- Add docs

* Replaying should copy over the metadata

* transfer final attempt output to the task run

* A couple of minor fixes

* Use the new clientOrThrow() method everywhere

* Cleaned up the update metadata endpoint and added an API doc page for it

* Mirror task run attempt errors and output
2024-09-26 09:23:38 +01:00
Eric Allam d361e24bee Associate child runs with the parent span ID (#1352)
* Add safe rootTaskRunId index and a README to @trigger.dev/database

* Associate child runs with the span ID of the span in the parent run that triggered the child run

* Update deprecation notice doc links
2024-09-24 15:47:44 +01:00
James Ritchie bff38dceb5 Puppeteer extension: set the PUPPETEER_EXECUTABLE_PATH env var (#1350)
* Set the PUPPETEER_EXECUTABLE_PATH env var

* Create real-bags-joke.md
2024-09-24 13:25:00 +01:00
github-actions[bot] af7194d078 chore: Update version for release (#1341)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-24 10:55:34 +01:00
Eric Allam d7a65f3e7a Fix resolving external packages that are ESM only (#1346)
* Fix resolving external packages that are ESM only by falling back to mlly resolvePathSync. This will fix mupdf

* when publishing a prerelease and aborting, clear the git stage
2024-09-23 16:21:04 +01:00
Harsh Shrikant Bhat 9ce3f790f9 fix: Added dev.vars into dotEnv file (#1340)
* Added dev.vars into dotEnv file

* Added changes

* Update yellow-knives-attack.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2024-09-21 09:12:48 +01:00
github-actions[bot] e47b6cf166 chore: Update version for release (#1328)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-20 16:24:45 +01:00
Thibaut Cuchet 1f5bcc73b5 fix: audiowaveform extension (#1335)
* fix: audiowaveform extension

* Create lovely-dolphins-chew.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2024-09-20 16:09:47 +01:00
Eric Allam 764f03a3c5 Fixed schema types for the runs.retrieve() SDK function 2024-09-20 13:23:48 +01:00
Eric Allam ba3c5bdf33 Adding missing task run hierarchy to TaskRun table (#1332)
* Add task run hierarchical relationships to the database

* Add depth and related runs to the retrieve run API response

* Remove prisma optimize

* restructure the migrations to create the index concurrently

* Delete these tsbuildinfo files

* Fix type error by adding depth to the run list presenter

* Cleanup the task hierarchy, share more code

* Remove some fields from the list run response
2024-09-20 11:09:00 +01:00
Niels 64862db846 Update dotEnv.ts to ignore OTEL_EXPORTER_OTLP_ENDPOINT as well (#1307)
* Update dotEnv.ts

* Create four-buttons-run.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2024-09-19 15:25:17 +01:00
Thibaut Cuchet c65d4822b4 Feat: Extension puppeteer (#1323)
* feat: add puppeteer extension

* chore: update package and config

* feat: add puppeteer task

* Create little-donkeys-protect.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2024-09-19 15:22:57 +01:00
Eric Allam b4be736555 prismaExtension fixes for #1325 and #1327 2024-09-19 15:21:03 +01:00
Eric Allam 4e0bc485a1 Add support for Buffer in payloads and outputs 2024-09-19 13:20:31 +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
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
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
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
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 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
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
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
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
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 392453e8a6 Frozen run fixes (#1286)
* When resuming a batch, only do marqs operations once

* Made TaskRunDependency clearer in the Prisma schema

* New ResumeDependentParentsService service, use it from checkpoints

* WIP on making resuming more robust

* Turn the declarative schedules off because they make debugging other runs painful

* Resuming batches when there’s an attempt is working

* If there’s no attempt then create one

* Added a log if there are no span events to complete

* If Graphile addJob doesn’t return a row, log and return undefined. No throw

* Pass prisma into the ResumeDependentParentsService

* Removed the todos

* Pass Prisma through to the checkpoint service

* Fix for not checking the batch item correctly

* Fix for when a log flush times out and the process is checkpointed

* Fix for when a log flush times out and the process is checkpointed

* Another test run that does batches with failed subtasks

* Don’t call ResumeTaskRunDependenciesService anymore (we have a new service)

* Only resume if the run is in a final state

* If an attempt doesn’t exist, fix for creating queue with sanitized name

* If DEV then don’t resume using marqs/batches. The CLI manages it

* We don’t need to check the run status again, it’s in the main function now

* Added TaskRunAttempt taskRunId index

* Only allow calling ResumeDependentParentsService with a run ID

* Put the flushing back to what it was
2024-09-09 16:03:36 +01:00
Eric Allam 87e46d497b projects now have a dedicated build server (#1281) 2024-09-06 09:36:03 +01:00
James Ritchie 022bbe1371 Fixed type issues with emails 2024-09-05 17:22:58 +01:00
James Ritchie 3e0881c2e9 Added project name to run alert email 2024-09-05 15:33:55 +01:00
Eric Allam f040417440 v3: new build system fixes (#1278)
* Support custom config file names & paths

* Fix entry point paths on windows

* Support custom conditions

Add support for custom conditions (for bundling and running), to support being able to import `ai/rsc` with the “react-server” condition.

- Fixed an issue where symlinking unresolvable externals after rebuilding caused the build to hang
- Fixed an issue with external not working with subpath exports (e.g. “ai” would not match “ai/rsc”)
- Protect better against build extensions breaking builds

* Add changeset

* Fix passing CLI process.env down to the task processes

* Remove unused import

* reviving the e2e CLI tests

* Another attempt at fixing windows

* yet another windows attempt (yawa)

* Output index child stdout and stderr (yawa)

* normalize import paths for windows

* Added some logging (yawa)

* normalize the loader path as well

* Added some logging to figure out why the entry points aren’t being found on windows

* Fix for entry point detection on windows

* Normalize runner import loader path

* Normalize import paths in dev and make sure rewritten build manifest paths are correct on windows as well

* Various cleanup after windows fixes

* Remove the webapp e2e for now

* Add node10 type resolution support for subpath exports (still does not actually import in Node 10 or Browserify/Parcel)

https://github.com/andrewbranch/example-subpath-exports-ts-compat

* init using templates again but downloaded from the repo this time

* Adding init schedule example

* Support for js init

* init now working with js

* Fix issues with links in terminals that don’t support them. Also skip update check of version starts with 0.0.0
2024-09-05 12:56:23 +01:00
Eric Allam c6b8a5a64b Manually update package versions to 3.0.0-beta.56 2024-09-02 13:39:50 +01:00
Matt Aitken f7d32b83b1 Free up concurrency when using triggerAndWait. Improved errors on runs (#1272)
* Add an error to the final attempt if there isn’t one

* Improved the checkpointResumer test task

* Using triggerAndWait or batchTriggerAndWait frees up concurrency

Normally it frees up just env and org concurrency. If it’s a recursive task then it will free up the run concurrency too (e.g. a task calling itself).

* Removed the filepath and export name from attempt spans

* Run inspector: only show an error if the run is in a finished state
2024-08-25 20:15:45 +01:00