Commit Graph

1021 Commits

Author SHA1 Message Date
Matt Aitken 8ddd151051 Re-ordered runTask params in docs, and example Jobs in the app. 2023-09-06 18:31:50 +01:00
Eric Allam 30ba73c4f1 Various run execution fixes (incl massive memory bloat issue)
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
This commit fixes various issues with run executions, including a pretty gnarly memory bloat issue when resuming a run that had a decent number of completed tasks (e.g. anything over a few). Other issues fixed:

- Run executions no longer are bound to a queue, which will allow more parallel runs in a single job (instead of 1).
- Serverless function timeouts (504) errors are now handled better, and no longer are retried using the graphile worker failure/retry mechanism (causing massive delays).
- Fixed the job_key design of the performRunExecutionV2 task, which will ensure resumed runs are executed
- Added a mechanism to measure the amount of execution time a given run has accrued, and added a maximum execution duration on the org to be able to limit total execution time for a single run
2023-09-05 09:51:43 +01:00
Eric Allam 9f076631ae #346 Improve run dashboard perf when tasks have large outputs
Performance degradation came from the syntax highlighting of large code blocks and from doing that on the server and the client, so fixed this in a couple of ways:

1. Stream the task details data using defer and Suspense/Await
2. Skipped syntax highlighting code blocks with more than 1k lines
2023-09-01 22:05:06 +01:00
James Ritchie bd28556bf3 Made the loading spinner white 2023-08-24 14:25:59 +01:00
James Ritchie 19a8d39fb0 The Delete button displays full width again 2023-08-24 14:11:55 +01:00
James Ritchie 708ebbde14 Features: Disabling and deleting jobs (#381)
* Don’t show the Ready To Run Job prompt if you have an Integration that needs attention

* Don’t highlight the row red or green

* Improvements to the contrast of the app sections and dividers

* Removed the Jobs page title as it’s duped info

* using the new border variable

* Sticky last table cell

* Improved the sticky last table cell

* Make any last cell in a table sticky by adding isSticky to it

* Added a dropdown menu to the menu table cell

* table rows can be marked as disabled by adding disabled

* Using the jobTestPath function for the test path

* tidy up imports

* Removed un-used props

* Removed the green badge variant

* Added a new status badge to the Runs table

* Clicking the gradient clicks the row

* Delete Job triggers a modal popup

* Added a large danger button type

* Added some modal styling and started adding data

* Added more styling and data to the delete job modal

* A table can now be given a full width prop

* Large danger button added to Storybook

* Danger button disabled state looks disabled now

* New active badge component to display in the table and logic for showing the env data

* Style updates to the dialog component

* active and job status badges can now have a small size

* Added a new named icon

* The Job page shows the Job status in the PageInfoRow

* Small badge style update

* Runs table has a sticky right cell

* Created a JobStatusTable component

* Added some placeholder help panel content for disabling a Job

* WIP creating a Settings page

* Added a delete button that triggers the delete modal – just need data hooking up

* Implemented deleting jobs from the dashboard

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2023-08-24 10:30:00 +01:00
Liran Tal 4ce96b7d28 fix: avoid code duplication by repostioning the default switch case (#356) 2023-08-18 14:48:07 +01:00
James Ritchie 5f739ee312 Removed ts-ignore and added types 2023-08-11 16:11:27 +01:00
James Ritchie fccba7db98 Upgraded the confetti to fireworks 2023-08-11 16:09:47 +01:00
Eric Allam 9dd7fb2748 Improved the onboarding experience
- Automatically refresh the jobs page when there are no jobs
 - Celebrate 🎊
2023-08-11 14:08:39 +01:00
James Ritchie c4da1b4a9a Updated the discord link
🚀 Publish Trigger.dev Docker / ʦ TypeScript (push) Has been cancelled
🚀 Publish Trigger.dev Docker / Unit Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / e2e Tests (push) Has been cancelled
🚀 Publish Trigger.dev Docker / publish (push) Has been cancelled
2023-08-09 16:09:33 +01:00
James Ritchie 645643ea41 Improved onboarding (#292)
* Only show the Example Jobs list when you have 1 job

* Updated the logic for displaying the different information depending on the no. of jobs you have

* Removed some unnecessary markup

* Clicking on a radio option toggles the content

* Improved the centering of the help panel

* Conetent updates to the 2 onboarding paths

* Added a prompt so you click through to run your job

* More content updates to the help panel

* Only show the prompt if the Job has never been run

* Added back in the help panel which shows the examples table if you have > 0 jobs

* Added a dialog for the I am Stuck button

* Added the new ‘new-next-app’ text for the cli command

* Refactored the ternary logic so it’s simpler

* Removed I’m stuck button and cleaned up imports

* Added in feedback button

* Added margin bottom to the Callout on the Test popover

* WIP adding a new radio button variant that takes an icon

* Added a new step to create a new next app

* The state of the tabs is stored as a URL param

* Small shadow tweak to the side panel

* Added a Discord button to the feedback menu

* Added new icons to the Named icons component

* Added a gradient to the background of the jobs page

* Made the icons take on color outside of component

* Added another NamedIcon for tree

* Fixed number

* Improved some of the typography styles

* Updated the icons

* Fixed issue with radio buttons alignment

* Added a missing step to the new next app onboarding

* Refactored example code and added all the examples to the panel

* Small icon update

* Made the title white again

* Added an icon to the storybook radiogroup

* Added a badges storybook

* Chevron table cell now takes children

* import cleanup

* Changed the background image from an arbirary value to an import

* Added a NEW badge which shows if you have a new job

* Improved the copy on the Examples help panel and updated some of the layout

* Removed defaultOpen on the help panel

* Stop the icons getting smaller

---------

Co-authored-by: D-K-P <dkp.github@pm.me>
2023-08-09 15:00:08 +01:00
D-K-P 55c3d79cc8 Deleted the info box on the integration pages 2023-08-02 17:11:41 +01:00
Matt Aitken 9ff4c0dbd5 Project-wide Prettier setup (#237)
* Setup project-wide prettier

* Remove old workspace file

* Remove old debugging directives

* New top-level .prettierignore

* Updated Prettier config settings

* Contrubuting guide: Fix for some bad code blocks

* Added more ignores

* Improved the format script command

* printWidth set to 100

* Formatted entire repo (pnpm run format)
2023-08-01 10:21:22 +01:00
Matt Aitken 92233f2e90 Core package and move to @latest (#235)
* Changeset should ignore the example projects

* Removed note in Contributing instructions about not adding a changeset for internal

* Renamed @trigger.dev/internal to @trigger.dev/core. Set sdk and internal to be ES2020, so we don’t get errors about private identifiers

* Env vars in nextjs-example use square bracket syntax to avoid Turbo Repo errors

* Set the tsconfigs back for core and sdk

* @examples/nextjs compile error with undefined tasks

* Set the example projects to use ES2015 to avoid private modifier complaints

* package-tester example, which will use built packages

* package-tester package.json

* Created a readme for the package-tester

* Added all the packages to package-tester

* Create .env.local.example and readme instructions

* Added name to the package.json

* Upgraded @types/react and @types/react-dom everywhrre, so we can use server actions

* Upgraded @types/react and @types/react-dom everywhrre, so we can use server actions

* Reworked the react package build, so it generates separate files

* The SDK no longer bundles core

* package-tester setup with a server action and react hooks

* Added new SDK methods with logging

* Working tsup settings for client and server

* Explicit react hooks return types

* Added all the hooks for testing

* Added OpenAI step to the job to check types are still ok in integrations

* Get rid of rogue Changeset ignores

* Changeset: @trigger.dev/core is now a separate package

* Exited prerelease mode, added a changeset

* Changed @next to @latest

* Deleted seed.js, this shouldn’t be committed

* Ignore seed.js

* The webapp was importing @trigger.dev/core with a folder path rather package name…

* More webapp imports instead of @trigger.dev/core were a folder path

* Accidentally edited Stripe internal API url in the comment

* Added “sideEffects”: false so @trigger.dev/core is tree shaken by Remix
2023-07-31 18:47:34 +01:00
Eric Allam 9351c05126 Initial @trigger.dev/stripe integration, with support for triggers and tasks (#231)
* Initial Stripe integration, with support for triggers and tasks

* Adding stripe integration to the catalog
2023-07-27 22:09:07 +01:00
Matt Aitken d3608be1a0 Improved the environments help text – it now references server API keys 2023-07-26 22:00:16 +01:00
Matt Aitken 0a3bbc1caf Merge remote-tracking branch 'origin/main' into react-hooks
# Conflicts:
#	apps/webapp/app/presenters/RunPresenter.server.ts
#	examples/nextjs-example/src/app/api/trigger/route.ts
#	examples/nextjs-example/tsconfig.json
2023-07-26 20:47:07 +01:00
Eric Allam 767e09ee18 New integration: @trigger.dev/supabase (#203)
* WIP supabase integration

* supabase oauth working

* Supabase database triggers

* Specify postgres:14

* Limit refreshOAuthToken jobs to 10 attempts

* Better displaying types and removing onChange for now

* WIP on the supabase db client

* Finishing the supabase-js integration

* Adding changeset

* Added supabase to the integration catalogs, and added an optional icon to Integrations

* Reworking how we handle types for the triggers (wip)

* Update fully over to the new way to define supabase triggers

* Go back to using the type for the event name

* Add back in the icon to the JobListPresenter since it was moved from the ProjectPresenter

* Remove unused import
2023-07-26 18:01:27 +01:00
Matt Aitken 188e4f2740 Added an outline styled for badges 2023-07-26 16:40:51 +01:00
Matt Aitken 0b89ee7eb5 ProjectsMenu truncates long titles and the badge is right-aligned 2023-07-26 13:37:18 +01:00
D-K-P f84f4dcee6 Updated the blank jobs page instructions 2023-07-25 16:02:03 +01:00
D-K-P bfa3757ee0 Updated the help & feedback copy 2023-07-25 15:16:33 +01:00
D-K-P 8af381729c Added example projects to the blank jobs page 2023-07-20 17:36:23 +01:00
D-K-P 8ca0aeb1bd Updated the side panel copy 2023-07-20 14:48:33 +01:00
D-K-P b6fd62eb54 Changed ‘Send us feedback’ to ‘Help & feedback’ 2023-07-20 12:17:34 +01:00
SSHari 0cda4621c7 feat: 🎸 add project count pill to breadcrumb project menu 2023-07-19 18:48:07 -04:00
SSHari 62e3bb93c1 feat: 🎸 move get project jobs to lower level in app hierarchy 2023-07-18 12:10:45 -04:00
James Ritchie 5e522e1f3e Updated the yarn install to yarn dlx 2023-07-18 10:51:50 +01:00
Akhil d6e43c40c9 feat: added defineJob method in TriggerClient 2023-07-15 15:55:53 +00:00
James Ritchie bb11001fb7 Added 2 buttons below the list of Integrations
2 CTA to request a missing API and to link to the docs to create your own integration
2023-07-13 18:07:19 +01:00
James Ritchie 1ea0d39fa2 Added an iconClassName to the NamedIcon component so you can override the colour 2023-07-13 18:07:19 +01:00
Matt Aitken ff58925606 The Project side menu now shows an error icon on Triggers and Integrations if action is required 2023-07-12 15:44:13 +01:00
Matt Aitken b08c10a716 Warnings are triangles, errors are circles 2023-07-12 15:43:40 +01:00
Matt Aitken b878561f65 Added custom ErrorIcon that has a white exclamation so it can be seen on busy backgrounds 2023-07-12 15:43:28 +01:00
Matt Aitken 073c4fb76e TextLink moved to a separate file, and added a secondary style to it 2023-07-12 15:06:46 +01:00
Matt Aitken 3f8f76df76 Interval Trigger icon is a clock, instead of a calendar to differentiate from CRON 2023-07-12 14:43:16 +01:00
Matt Aitken 0a80e2f5ec Added CANCELED TaskStatus to the server 2023-07-12 09:18:59 +01:00
Matt Aitken 4661d2019c Canceling runs 2023-07-11 19:50:06 +01:00
Matt Aitken 4e4e7b705d Rerun moved to a resource route 2023-07-11 18:49:00 +01:00
Matt Aitken 6ef62d82c4 You can add containerClassName to a Table 2023-07-11 16:27:05 +01:00
Matt Aitken 0a7bae4dac Use the handle to determine if the side menu is expanded 2023-07-11 14:35:14 +01:00
Matt Aitken 396663d65c Hooks can use passed in matches. Breadcrumb updated to be in the route 2023-07-11 12:46:39 +01:00
Matt Aitken 686cf9dc7e Trigger registration runs displaying 2023-07-10 16:35:48 +01:00
Matt Aitken a9e7cda37d Run page turned into components so it can be shared 2023-07-10 15:47:13 +01:00
Matt Aitken eae0b8a95e The Run page now uses a component so it can be shared 2023-07-10 15:20:01 +01:00
Matt Aitken d85b1fe2fd Moved components to the components/run folder ready for sharing 2023-07-10 15:02:03 +01:00
Matt Aitken 75a07fe4ef RunsTable displaying for registration attempts 2023-07-10 14:40:10 +01:00
Matt Aitken 4373538476 ClipboardField changed to spans so it can work inside a paragraph 2023-07-10 12:24:11 +01:00
Matt Aitken cb59808be2 Better type for LabelValueStack variations 2023-07-10 11:06:51 +01:00