Commit Graph

765 Commits

Author SHA1 Message Date
github-actions[bot] 911447304c chore: Update version for release (#1469)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-15 11:39:24 +00:00
amuwal 2be1062f1e fix: unintended project initialization at absolute path /trigger during project initialization (#1412)
* Fix parsing of project path for cli init command

* Update development instructions for cli-v3

* Create gentle-mails-sip.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2024-11-15 11:34:51 +00:00
Nico a5d59de39e Fix: vercelSyncEnvVars teamId (#1463)
* Update vercelSyncEnvVars.ts

* Update vercelSyncEnvVars.ts

* Update vercelSyncEnvVars.ts

* Update vercelSyncEnvVars.ts

* Update docs

* Add changeset
2024-11-12 11:19:25 +00:00
github-actions[bot] 365fabf9a0 chore: Update version for release (#1461)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-05 15:24:01 +00:00
nicktrn d7656314d6 Prevent stuck runs after duplicate dependency resume messages (#1459)
* ignore duplicate dependency resume messages

* add changeset
2024-11-05 12:00:02 +00:00
nicktrn 5368bcf6bd Improve resume reliability of restored runs (#1458)
* replay ready for resume

* clear replay state between attempts

* add changeset
2024-11-05 11:59:44 +00:00
github-actions[bot] 97533cba2e chore: Update version for release (#1442)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-01 21:32:04 +00:00
Eric Allam cc74cae393 chore: remove unnecessary browser export condition (#1455) 2024-11-01 21:11:45 +00:00
nicktrn 58def055d0 Add new internal error for very outdated SDK versions (#1453)
* add outdated sdk error and crash outdated runs instead of staying queued forever

* add changeset
2024-11-01 15:41:31 +00:00
Eric Allam ce1a54eb3b Renamed useBatch to useRealtimeBatch (#1447)
* Renamed useBatch to useRealtimeBatch

* Use the new hook name in the nextjs-realtime ref
2024-11-01 13:23:02 +00:00
Eric Allam 25285488f8 Add individual run ids to auto-generated public access token when calling batchTrigger (#1449) 2024-11-01 13:22:34 +00:00
nicktrn fa18e6c012 Increase maximum retry count for deploy run controller (#1450)
* increase max retries for all deploy run controller operations

* add changeset
2024-11-01 11:23:11 +00:00
nicktrn 4194bce4a3 Forked worker processes now inherit PATH from parent (#1448)
* set PATH when forking

* add changeset
2024-11-01 11:23:00 +00:00
nicktrn da08e5015f Pass init output to all error handlers (#1441)
* pass init output to all error handlers

* add changeset
2024-10-31 11:23:47 +00:00
github-actions[bot] 53841d7bf0 chore: Update version for release (#1423)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-29 12:24:21 +00:00
nicktrn 212f8539c3 Automatically reattempt after internal errors (#1424)
* refactor finalize run service

* refactor complete attempt service

* remove separate graceful exit handling

* refactor task status helpers

* clearly separate statuses in prisma schema

* all non-final statuses should be failable

* new import payload error code

* store default retry config if none set on task

* failed run service now respects retries

* fix merged task retry config indexing

* some errors should never be retried

* finalize run service takes care of acks now

* execution payload helper now with single object arg

* internal error code enum export

* unify failed and crashed run retries

* Prevent uncaught socket ack exceptions (#1415)

* catch all the remaining socket acks that could possibly throw

* wrap the remaining handlers in try catch

* New onboarding question (#1404)

* Updated “Twitter” to be “X (Twitter)”

* added Textarea to storybook

* Updated textarea styling to match input field

* WIP adding new text field to org creation page

* Added description to field

* Submit feedback to Plain when an org signs up

* Formatting improvement

* type improvement

* removed userId

* Moved submitting to Plain into its own file

* Change orgName with name

* use sendToPlain function for the help & feedback email form

* use name not orgName

* import cleanup

* Downgrading plan form uses sendToPlain

* Get the userId from requireUser only

* Added whitespace-pre-wrap to the message property on the run page

* use requireUserId

* Removed old Plain submit code

* Added a new Context page for the docs (#1416)

* Added a new context page with task context properties

* Removed code comments

* Added more crosslinks

* Fix updating many environment variables at once (#1413)

* Move code example to the side menu

* New docs example for creating a HN email summary

* doc: add instructions to create new reference project and run it locally (#1417)

* doc: add instructions to create new reference project and run it locally

* doc: Add instruction for running tunnel

* minor language improvement

* Fix several restore and resume bugs (#1418)

* try to correct resume messages with missing checkpoint

* prevent creating checkpoints for outdated task waits

* prevent creating checkpoints for outdated batch waits

* use heartbeats to check for and clean up any leftover containers

* lint

* improve exec logging

* improve resume attempt logs

* fix for resuming parents of canceled child runs

* separate SIGTERM from maybe OOM errors

* pretty errors can have magic dashboard links

* prevent uncancellable checkpoints

* simplify task run error code enum export

* grab the last, not the first child run

* Revert "prevent creating checkpoints for outdated batch waits"

This reverts commit f2b5c2ac42.

* Revert "grab the last, not the first child run"

This reverts commit 89ec5c8bfd.

* Revert "prevent creating checkpoints for outdated task waits"

This reverts commit 11066b4e74.

* more logs for resume message handling

* add magic error link comment

* add changeset

* chore: Update version for release (#1410)

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

* Release 3.0.13

* capture ffmpeg oom errors

* respect maxAttempts=1 when failing before first attempt creation

* request worker exit on fatal errors

* fix error code merge

* add new error code to should retry

* pretty segfault errors

* pretty internal errors for attempt spans

* decrease oom false positives

* fix timeline event color for failed runs

* auto-retry packet import and export

* add sdk version check and complete event while completing attempt

* all internal errors become crashes by default

* use pretty error helpers exclusively

* error to debug log

* zodfetch fixes

* rename import payload to task input error

* fix true non-zero exit error display

* fix retry config parsing

* correctly mark crashes as crashed

* add changeset

* remove non-zero exit comment

* pretend we don't support default default retry configs yet

---------

Co-authored-by: James Ritchie <james@trigger.dev>
Co-authored-by: shubham yadav <126192924+yadavshubham01@users.noreply.github.com>
Co-authored-by: Tarun Pratap Singh <101409098+Wackyator@users.noreply.github.com>
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-10-24 11:12:24 +01:00
shubham yadav 9a5e6e58be Fix: Handle circular references in flattenAttributes function (#1433)
* Fix: Handle circular references in flattenAttributes function

* Update flattenAttributes.test.ts

* Update packages/core/src/v3/utils/flattenAttributes.ts

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

* Update packages/core/src/v3/utils/flattenAttributes.ts

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

* Create brown-laws-rest.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Eric Allam <eric@trigger.dev>
2024-10-24 10:44:04 +01:00
Eric Allam c31700ae5f Fix issue with lost built trigger.dev files after prisma generate (#1429)
* Fix issue with lost built trigger.dev files after prisma generate on deploy

* Add changeset
2024-10-24 10:43:26 +01:00
Dan 982906cbad Vercel sync env vars extension (#1425)
* Added vercelSyncEnvVars extension

* Updated extension and added try catch

* VercelEnvironment fix

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

* Added changeset

* Moved vercelSynvEnvVars to code and updated core.ts

* Fixed import

* removed type

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-10-23 13:01:30 +01:00
Eric Allam 2d8a41b18b feat: realtime (#1402)
* Denormalize run tags, increase character limit to 128

* WIP realtime subscribing to runs

* extracted the stream stuff into core, made it more reusable

* WIP tags

* Remove tags for now because it’s not support in electric

* Support async iterables, readable stream, and callback style subscription styles

* Remove tags streaming endpoint

* Add realtime rate limits and scope them to the /realtime path

* WIP rate limt per org

* Introduce per org rate limits

* WIP JWT auth

* Move migrations into new internal db package

* Resolve pnpm lock file

* Authenticating to the realtime API with JWTs are working

* realtime in the client

* Created react-hooks package and starting to move stuff in there

* Improve types for hooks

* schema tasks

* Added useBatch hook

* build uploadthing/fal demo and change how run metadata is synced to the server

* tweaks

* WIL realtime concurrency tracking

* Implement test for realtime client using testcontainers

also updated electric to latest version

* Allow customizing the expiration time of the automatic JWT created after triggering a task

* Add support for subscribing to run tags

* Improve auth types and API

* finalize the realtime API

* Fixed some example stuff

* Allow up to 10 run tags

* Remove core from docker-provider tsconfig paths to prevent it from being typechecked

* do the same for the kubernetes provider

* Fixing some typecheck errors

* Fix webapp type errors

* Update @trigger.dev/platform to 1.0.13

* Fix attw error

* Remove from/to in subscribeToRuns query params

* Add tests for the rate limit middleware and add custom JWT rate limits

* turn off webapp test parallelism

* Finish renaming jwt -> publicAccessToken and automatically give the JWT read access to the tags when using trigger

* Add changeset

* Attempt to fix unit tests in CI

* Skip running the auth rate limit middleware tests for now

* Try a beefier machine

* Try and run webapp tests separately

* Setup env vars

* Make sliding window test more reliabile
2024-10-21 15:07:08 +01:00
github-actions[bot] f1d89c413b chore: Update version for release (#1410)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-18 17:24:53 +01:00
nicktrn 90593adea5 Fix several restore and resume bugs (#1418)
* try to correct resume messages with missing checkpoint

* prevent creating checkpoints for outdated task waits

* prevent creating checkpoints for outdated batch waits

* use heartbeats to check for and clean up any leftover containers

* lint

* improve exec logging

* improve resume attempt logs

* fix for resuming parents of canceled child runs

* separate SIGTERM from maybe OOM errors

* pretty errors can have magic dashboard links

* prevent uncancellable checkpoints

* simplify task run error code enum export

* grab the last, not the first child run

* Revert "prevent creating checkpoints for outdated batch waits"

This reverts commit f2b5c2ac42.

* Revert "grab the last, not the first child run"

This reverts commit 89ec5c8bfd.

* Revert "prevent creating checkpoints for outdated task waits"

This reverts commit 11066b4e74.

* more logs for resume message handling

* add magic error link comment

* add changeset
2024-10-18 16:46:38 +01:00
nicktrn feb4fcdac6 Fix bun runtime by downgrading to 1.1.24 (#1409)
* pin bun to 1.1.24 and use slim image

* add changeset

* add warning about bun version to docs
2024-10-14 18:00:10 +01:00
Dan a6de3f0ff3 README updates (#1408)
* Main README edits

* SDK readme edits

* CLI readme edits

* Create cool-keys-sit.md

---------

Co-authored-by: Eric Allam <eric@trigger.dev>
2024-10-14 16:39:19 +01:00
github-actions[bot] 8a70ce4cff chore: Update version for release (#1394)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-09 16:15:58 +01:00
nicktrn 4f85119dfd Misc fixes related to error display (#1397)
* Fix execute error handling

* replace internal errors on attempts

* correctly display env var errors while indexing

* display correct errors on crashed attempts

* add changeset
2024-10-09 15:10:48 +01:00
nicktrn 215c8ed6b2 Remove unused path arg from the CLI dev command (#1395)
* remove path arg from dev cli command

* add changeset
2024-10-09 12:49:35 +01:00
nicktrn bf15d8aff1 Improve coordinator logs and extend structured logger (#1389)
* docker provider shouldn't force simulate by default

* structured logs for all things coordinator

* attributes for handler loggers

* add changeset

* fix tmp cleaner types

* remove unused simple logger import

* fields from args should override existing fields

* improve socket logs

* change log message position for easier scanning

* more logging improvements, more metadata
2024-10-09 12:20:55 +01:00
nicktrn 4b0f677774 Prettier errors and related improvements (#1387)
* improve get attempt payload logging

* only log checkpoint readiness timeouts, don't crash the run

* improve coordinator errors

* add links export to core

* remove unused deploy error utilities

* update cli errors and use new links from core

* log remaining failure reasons

* also parse execute errors in deployed worker

* add signal to unexpected exit messages

* start displaying prettier internal errors

* improve unexpected exit error parsing

* better errors for crashes

* fix unexpected error parsing for dev runs

* changeset

* parse graceful exit timeouts
2024-10-09 12:12:47 +01:00
Matt Aitken 886429b0ed Removed emails, @trigger.dev/database and @trigger.dev/otlp-importer from changesets config 2024-10-08 18:36:46 +01:00
github-actions[bot] 13ebfcc5b9 chore: Update version for release (#1381)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-08 13:24:38 +01:00
nicktrn 002ae4bc0d Fix dotenv overrides for dev runs (#1388)
* override dashboard dev env vars with local .env

* add changeset

* add simple task for testing env vars
2024-10-08 09:22:29 +01:00
nicktrn a69e04f03a Include push output in logs for self-hosted deploys (#1382)
* include push output in logs

* changeset
2024-10-05 14:18:58 +01:00
nicktrn c5488df8ca Fix CLI downgrade check (#1380)
* fix downgrade detection

* remove unused semver package from webapp

* add changeset
2024-10-05 13:12:47 +01:00
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
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 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 6d4c4d214f Attempt to use @remix-run/changelog-github to have better formatted changeset version descriptions 2024-09-23 21:10:26 +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 e79f0cc847 Add forgotten changeset for task hierarchy PR 2024-09-20 11:13:20 +01:00