Commit Graph

4618 Commits

Author SHA1 Message Date
Matt Aitken 67c62f7d25 v3 is restricted to approved orgs (#965)
* v3 projects can only be created if the org has permissions to do it

* Admin page

* Removed unused classes

* Admin org page, with links between user and org pages

* Set v3 enabled or not
2024-03-25 11:28:21 +00:00
Matt Aitken c6d6a9191c Hide show.actions from the properties panel (#964) 2024-03-22 19:53:28 +00:00
Eugene Yaroslavtsev cd8f6b9af0 fix: [nestjs integration] fastify HTTP adapter detection now works correctly for response headers (#938)
* fix: [nestjs integration] fastify HTTP adapter detection now works correctly for response headers

- fixed a bug where Fastify responses were incorrectly processed as Express due to overlapping method names.
- introduced type guards to differentiate between Express and Fastify response objects.
- bumping @trigger.dev/nestjs patch version to 2.3.19

* fix TS type check build error
2024-03-22 14:41:21 +00:00
Kritik Jiyaviya a49b659701 feat: Ability to revoke an invite to an org (#902)
* feat: Ability to revoke an invite to an org

* Resolve a conflict with main

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-03-22 14:35:49 +00:00
Edward Fu 61c9a7c7d6 Fix opanai code example in docs (#961) 2024-03-22 14:17:37 +00:00
Matt Aitken de302858f8 v3 docs (#929)
* Started building out the docs navigation

* Drafted out a lot of the docs pages. With just titles and descriptions with a coming soon message for now.

* A ton more scaffolded pages with titles, descriptions, coming soon/incomplete docs messages

* Created the remaining page stubs

* Introduction page improvements

* Lots of docs changes, mostly the task overview page

* Moved some bits around

* Task overview fleshed out

* Triggering docs page

* Regular task page

* CLi dev docs

* Docs for debugging locally

* Environment variables docs

* Added env var images

* Deployment guides

* Updated the title of “Integrations” to “Deployment integrations” to make it less confusing

* Lots more docs pages

* Changed the language to JavaScript

* Fixed typos about queues and added a simple code sample

* Moved the local debugger docs into the CLI dev page

* Added the CLI deploy options

* Delete the local debugger page

* Updated the logging page with structured logging

* Added the new CLI deploy options

* Change to h4 for one of the options

* Errors page

* WIP on retrying

* Retrying guide

* Wait docs pages

* Queuing docs simplified, partial written

* Queuing and concurrency docs

* Run tests docs

* New combined error and retrying page

* Errors and retrying page updated

* More docs

* Added a possible configurations coming soon table

* Created a limits page

* Added warnings about how you need to get early access

* Minor fixes for the docs
2024-03-22 14:09:27 +00:00
Matt Aitken cf9d466b9e Basic JSDocs for the v3 SDK (#963)
* task(), retry and queue

* Added machine JSDocs

* Add JSdocs for the run function params
2024-03-22 14:09:06 +00:00
Eric Allam 7b3ffe040b v3: config file is now ts by default and uses named exports (#962)
* A bunch of changes to the config file:

- No more default export, the config is exported via the `config` named export
- `handleError` is moved to a separate named export
- Added the ability to include additional packages (e.g. wrangler) that aren’t included by default (think CLI usage)
- More reliably install packages in dev
- The config is now built first instead of directly imported, meaning we can now support typescript config files (`trigger.config.ts`)

* Update to trigger.config.ts in `trigger.dev init`
2024-03-21 10:40:44 +00:00
Eric Allam 737ff9928c When cancelling a run in the UI make sure the task run status is cancelled not interrupted 2024-03-20 13:22:50 +00:00
Eric Allam fc4b95d69e A bunch of deployment fixes (#960)
- Time out deployments to prevent never-ending building/deploying
- Use the CURRENT worker deployment when determining which version to execute
- Fix some of the deployment error handling logic
2024-03-20 13:15:48 +00:00
James Ritchie 6c546936f3 Improved v3 feedback button (#959)
* Removed feedback button from PageHeader

* Show a different feedback button in the side menu for v3 projects

* Fixed issue with button wrapping on smaller width browser
2024-03-20 12:16:20 +00:00
James Ritchie 08e4fc002f V3 UI improvements (#958)
* Adding a v3 feedback button top-right

* Changed paused to frozen for attempts

* Reordered and renamed run statuses

* Dropdown status menu shows tool tips on hover

* Added a new DP feedback button in the header

* Created a more useful feedback sheet

* Added loading bar animation to storybook

* Switch the integration page to point at the “feature” help instead of “integration” which has been removed

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-03-19 20:36:04 +00:00
Eric Allam 0e347b001b Don’t override TRIGGER_SECRET_KEY and TRIGGER_API_URL with local env vars 2024-03-19 16:04:31 +00:00
Matt Aitken 2e56af9742 Tasks page live-reloads with new tasks (#957)
* DevPubSub: use the schema that’s already been defined

* Publish a message to projectPubSub when a new DEV worker is created

* Live reloading of the tasks table (for dev tasks)

* Live notifications for deployed workers as well as local workers
2024-03-19 15:42:57 +00:00
Eric Allam dc5eb68a0b Fix typecheck errors because of resolveJsonModule 2024-03-19 15:33:09 +00:00
Eric Allam 891278ab1f Enable loading package.json inside of core 2024-03-19 15:24:01 +00:00
Eric Allam 41e1ac9e0b v3: nanosecond precision task events and immediate mode for dev events (#956)
* Store startTime in nanoseconds since epoch, ensure logs using nanosecond precision for their timestamp (so they are not out of order)

* export task events immediately in dev
2024-03-19 15:06:47 +00:00
Matt Aitken c5aaabdb4e The run timeline updates on the client if there's no new data (#955)
* Use “@v3” instead of “@latest” for the npx commands for v3

* Split the Timeline into a component so it can live refresh without re-rendering everything

* Timeline now live refreshes on the client every 500ms when run is executing

* The timeline bars now animate their position/width when it changes

* Export some more types from TreeView
2024-03-19 12:13:48 +00:00
Eric Allam affa3f25ee Trying beefier buildjet machines for CI 2024-03-19 11:38:48 +00:00
Eric Allam 86c24afb44 Support json traces and logs in the otel endpoints (#954) 2024-03-19 10:59:50 +00:00
Eric Allam 6afda40c35 Add depot setup action 2024-03-19 09:24:33 +00:00
nicktrn b585d1f2c5 v3: checkpoint restore events (#951)
* add checkpoint restore events

* fix retries.enabledInDev

---------

Co-authored-by: Eric Allam <eric@trigger.dev>
2024-03-19 09:02:56 +00:00
Eric Allam f26ba9a5cd Use depot.dev for docker builds (remove publishing to latest for now) 2024-03-18 20:52:08 +00:00
Eric Allam ba0ffacb15 Set the OTEL_EXPORTER_OTLP_ENDPOINT env var on dev workers 2024-03-18 20:16:25 +00:00
Eric Allam e55ca0279b Adding profile support to the v3 CLI (#953) 2024-03-18 17:35:29 +00:00
Matt Aitken 9304c447be Test, output and canceling improvements (#952)
* The vertical lines in the run tree view are now brighter

* Blank state when you click a task with no runs

* Canceling from the runs table

* Fix for styles coming through incorrectly to properties

* Fix for the OTEL output column having a $output prefix if it’s an object
2024-03-18 17:27:52 +00:00
Eric Allam ebec14093d Add healthcheck endpoint outside of remix if remix routes are disabled 2024-03-18 17:19:56 +00:00
Eric Allam 67cac97b26 Add DEPLOY_REGISTRY_HOST to allow configuring the deploy registry via the server 2024-03-18 15:56:28 +00:00
Eric Allam 0f32dee0eb Prevent depot command from displaying update message 2024-03-18 15:32:26 +00:00
Eric Allam 479d355b7b Setting DASHBOARD_AND_API_DISABLED=true will now disable the remix routes 2024-03-18 14:59:21 +00:00
Eric Allam 49e9dd8cb2 Disable fetch experimental warning and detect process resources (#950) 2024-03-18 13:46:24 +00:00
Matt Aitken cae3298564 Cancel run confirmation modal (#949)
* Tasks get the SHOW_ACTIONS property

* Override properties with the passed in ones in eventRepository

* Link from deployments to environment variables page, no need to link to docs

* “Show parent items” keeps the selected item selected

* LinkButton can accept onMouseDown, onMouseEnter and onMouseLeave

* “Show parent items” keeps any items focused and has a keyboard shortcut

* Action bar with focus button

* Canceling is working

* Nicer layout and button loading and disabled state

* US english spelling “Cancelling” -> “Canceling”

* Added a confirm modal to canceling

* Copy tweaks

* Fix for bad import

---------

Co-authored-by: Eric Allam <eric@trigger.dev>
2024-03-18 12:22:06 +00:00
nicktrn 1f190fe680 v3: fix dependency resume (#946)
* fix basic resume mechanics

* fix dependency resume

* fix deploy page sort

* remove task list console log

* checkpoint restore between attempts

* add checkpoint requirement checks to docker provider

* switch to raw execa for long statements

* catch and report pre-connection index errors

* graceful worker shutdown after completion

* fix final completion

* use same task process for each attempt

* update retry catalog entry

* add immediate return task

---------

Co-authored-by: Eric Allam <eric@trigger.dev>
2024-03-18 12:21:40 +00:00
Matt Aitken 85ec1af198 Don’t add proj_ to the front of the project ref 2024-03-18 11:05:09 +00:00
Eric Allam 52c364d691 v3: cli init command + CLI telemetry (#948)
* Adding telemetry to the deploy command

* Add ability to opt-out of telemetry in the CLI

* Remove log

* Unifying some telemetry stuff and adding it to the login command

* init command

* Remove extra trigger dirs

* Couple tweaks to the init CLI

* Don’t use npm init -y to create the package.json file
2024-03-18 10:12:11 +00:00
Matt Aitken a5d83971aa Cancel a run from the span view (#947)
* Tasks get the SHOW_ACTIONS property

* Override properties with the passed in ones in eventRepository

* Link from deployments to environment variables page, no need to link to docs

* “Show parent items” keeps the selected item selected

* LinkButton can accept onMouseDown, onMouseEnter and onMouseLeave

* “Show parent items” keeps any items focused and has a keyboard shortcut

* Action bar with focus button

* Canceling is working

* Nicer layout and button loading and disabled state

* US english spelling “Cancelling” -> “Canceling”
2024-03-17 11:42:30 +00:00
Matt Aitken 5b9c67aeef v3 deployments page (#945)
* Set the “current” deployment in WorkerDeploymentPromotion when a new deployment is completed

* Deployments page added to sidenav

* Basic deployments page working

* Pagination for deployments

* Right-align the pagination controls

* Improved the blank state

* Selected deployment panel

* Improved the side panel
2024-03-15 16:04:01 +00:00
Matt Aitken 1c98eb2b61 Use TaskRunStatus (instead of TaskRunAttemptStatus) (#944)
* Using the new run status instead of run attempt status

* The test page now uses the TaskRunStatus as well

* Organized imports

* Use TaskRun icons instead of attempt ones

* 10x zoom on the run timeline
2024-03-15 10:32:07 +00:00
Eric Allam f424c81086 No staging by default, and project external refs now are prefixed with proj_ 2024-03-14 15:11:31 +00:00
Eric Allam 0a33bf7206 v3: handle errors and customizing retrying (#943)
* Add the ability to handle errors at the task and project level

* Cancel in progress runs when disconnecting the dev CLI (in between attempts)

* unify the task executor across dev & prod
2024-03-14 14:38:13 +00:00
Matt Aitken 819b663ad7 Test page environment selection (#942)
* useLinkStatus hook

* Now you can customize the appearance of InlineCode

* Created <TaskFunctionName/>

* The test page now has an environment selector at the top
2024-03-14 13:54:47 +00:00
Eric Allam 478ce006cb v3: task run status and canceling runs (#941)
* WIP task run status, revamped resuming task dependencies

* Don’t select a span when toggling collapsing

* Cancel runs and attempts, in prod and dev
2024-03-13 15:51:43 +00:00
Eric Allam fe9435f63f Allow alternate config file names and skipping using a config file by passing —project-ref (#940) 2024-03-11 21:31:15 +00:00
Eric Allam d7cc2c9d6c v3: task payload refactor and configurable default retries (#939)
* Make the payload parameter the first argument to the task functions

* Allow configuring default retry behavior, and disabling in dev
2024-03-11 20:30:29 +00:00
Eric Allam 851b1769cb v3: use structured logging in a few places 2024-03-11 15:53:24 +00:00
Eric Allam e8381d5341 v3: Correctly handle tasks that have no output when resuming 2024-03-11 15:43:45 +00:00
nicktrn 20aa1cbe9b v3: checkpoint and restore with sim for local dev (#933)
* zod ipc connection with acks

* pass sender through to ipc handlers

* bits and bobs

* add host networking back in

* disable verbose logs

* restore after tasks and batches.. almost

* restore and resume all the things

* fix for systems without checkpoint support

* Get deployment indexing errors to work with the new ZodIpc stuff

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2024-03-11 15:20:33 +00:00
Eric Allam 883feab257 v3: various deploy improvements (#936)
* Cache the dependency resolution step of deploys

* Better deploy output and fixed an issue with deleting env vars
2024-03-11 14:31:55 +00:00
Eric Allam 83304f86f8 Capture uncaugh exceptions during indexing and fail deploys, with error output (#934) 2024-03-10 20:57:46 +00:00
Eric Allam 5d78bba5e3 Edit env var panel submit button Edit -> Save 2024-03-08 14:55:41 +00:00