Commit Graph

58 Commits

Author SHA1 Message Date
Eric Allam 17f9fc8273 Upgrade to pnpm 8.15.5 to fix ERR_INVALID_THIS issue
https://github.com/pnpm/pnpm/issues/6424
2024-03-27 12:27:19 +00:00
Matt Aitken 2a1273b683 Major v3 web app update (#924)
* Added the new colours to the Tailwind config

* Fixed Tsailwind compile errors

* WIP Geist working in the app

* WIP Storybook

* Storybook is working again… ouch

* Use Geist mono for CodeMirror

* Some find/replace class changes

* Resizable colours improved

* WIP on primary button

* Minor style improvements

* Improve the side menu header styling

* Improved v2 breadcrumbs

* Account side menu tweaks

* The page now works with the NavBar and UpgradePrompt

* Removed unused import

* Refactored the buttons to be dry-er

* Removed the breadcrumbs

* WIP on nav bar

* WIP updating the button styles

* Fix for the old test page

* Fix for type errors

* Removed console.log

* Colour change in the resizable handle

* New loading bar divider

* Removed the design plugin

* Creating our own storybook pages

* Added some “storybook” pages

* Added DetailCell storybook

* WIP new animation for the loading page

* Added the new loading divider

* Fix for the time frame filter having a green border

* Style improvements to the new test page

* Small style improvements

* Improvements to the list pagination components

* Nav bar back button improved

* Improvements to the run page

* Lots of v2 style improvements

* Help looks better

* Improvements to the regenerate API key modal

* More general improvements

* Added section titles to our storybook

* Added form stories

* Fix for missing key prop

* Loading bar is working

* Fixed button submitting state

* Fix for the test button icon

* Code bg improved

* Improved oauth buttons

* Integration page header fix

* Various improvements, mainly changing button variants

* Segmented control style updates

* Added an outline of 3px for the segment control

* Fixes for the billing pages

* More pricing improvements

* Added dialog to storybook

* Typography now in storybook

* Free usage bar added to storybook

* Added inline clode to storybook

* Separated menu types into a sub section in storybook

* NamedIcon now in storybook

* Added page header to storybook

* Added pricing callout to storybook

* Added radio groups to storybook

* Added segmented controllers to storybook

* Added shortcuts to storybook

* Added switches to storybook

* Added toast to storybook

* Added tooltips to storybook

* Added tree view to storybook

* Added usage charts to storybook

* Tarted up the environment variables page

* Fix for the FreePlanUsage panel bg colours

* Added new badge variants

* Added the <TaskPath /> to the tasks table

* Span header improvements

* Started work on the timeline

* Started work on the timeline

* Fix for the run page header

* Timeline tick marks are working

* Timeline working

* Got the durations showing on hover

* Button improvements

* Experimenting with how the duration should be shown

* Lots of refinements to the timeline

* Much nicer API for the Timeline

* The switch is now purple to match the design, with inverted thumb when on

* Removed old stuff

* Export the props

* Added the span with duration back in

* Simplified more and fixed the span durations

* Put in some decent dummy data

* Rendering defaults

* Wip with the mouse cursor

* Improvements to the story

* Added Slider primitive

* Integrated the icons into the slider

* Lots of layout improvements

* Cleaned up imports

* “Root” indicator

* Animated background on partials

* Pull the styles through to the spans and log dots

* Fixed some bugs in the TreeView when nodes get created or destroyed

* Fix for incorrect parentTask reference

* Added run streaming endpoint for live refreshing

* Added the tabs to Storybook

* Fix for status font size mismatch

* Fix for the misaligned run filter status

* Set a minimum duration on the timeline

* The TreeView now re-calculates if the number of nodes has changed

* Partials now render to the end

* Improved the durations gutter

* The duration is calculated using the current time if there are partial events

* Added the environment label to storybook

* Improved the environment label style

* Removed bottom margin from badge

* Button style improvements

* Callouts style fits the new design better

* Got the scrollbars to appear on the tree/timeline

* Added scroll support

* Synced scrolling working

* Close button and exit icon for the detail panel

* secure field shows start of env

* Clipboard improvements

* Latest lockfile

* Fix for the durations wrapping

---------

Co-authored-by: James Ritchie <james@jamesritchie.co.uk>
2024-03-04 17:33:53 +00:00
Eric Allam baf3a84cda v3 dev cli command + more (#894) 2024-02-12 14:24:32 +00:00
Eric Allam 17f6f29d05 Feature: Support multiple runtimes other than Node.js (#774)
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 0s
🚀 Publish Trigger.dev Docker / units (push) Failing after 5s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 5s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
2023-12-06 10:23:37 +00:00
Eric Allam 9a7c08c26a Improvements: Fix dangling SSE issue and compression memory leak (#733)
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 1s
🚀 Publish Trigger.dev Docker / units (push) Failing after 0s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 0s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
* Downgrade to remix-auth-email-link to remove yarn dependency

* Turn off the pg listen service for now

* Add snapshot admin route

* A couple logger fixes

* Add ability to disable compression

* Add ability to disable SSE

* Fix SSE memory leak + DB load issue
2023-11-10 16:02:53 +00:00
Matt Aitken 0d8530028f Added “test:e2e:ui” script so you can see Playwright running 2023-11-06 16:35:11 +00:00
Matt Aitken f73a2a424b Revert "Upgrade to the latest remix (pre v2)"
This reverts commit 4edc7112ab.
2023-09-21 13:19:03 -07:00
Eric Allam 4edc7112ab Upgrade to the latest remix (pre v2) 2023-09-18 22:20:41 +01:00
Matt Aitken 2382d4a5c5 Added patch back in 2023-09-05 16:29:23 +01:00
Matt Aitken 0754e99507 Removed changeset patch (it didn’t work) and instead use the documented experimental flag 2023-09-05 15:57:37 +01:00
Matt Aitken a9bb53b529 Use patched changeset package, to get unreleased feature with peer dependencies 2023-09-05 15:28:33 +01:00
Matt Aitken ecd050bece Airtable integration with webhook and integration changes (#399)
* CLI create-integration command now accepts an Open AI api key

* Create integration docs separated into multiple pages

* Initial Airtable integration commit, with OpenAI generated code

* OAuth page coming soon

* Export DisplayProperty from the SDK

* TSConfig made to match GitHub’s with paths

* getRecords

* Removed duplicate Stripe job from the catalog

* Renamed Airtable apiKey option to token

* First Airtable job

* Export Collaborator and Attachment field types

* A typesafe example that uses runTask

* WIP on new integration tasks… not working yet

* Attempt with class

* Revert "Attempt with class"

This reverts commit 93a48330019f754c3216c5b49964fa4b0218bd3f.

* WIP changing how tasks work

* Mock of async local storage

* Moved client creation from constructor

* New approach with a clone method on TriggerIntegration

* Added runTask to Airtable which is used by integration tasks

* Added the Airtable icon and connection when using runTask

* base().table() is working

* runTask options moved to the 3rd param, made optional with optional name

* Added some generic arguments

* Added generic type to table

* Removed old comment

* We don’t need to repeat the icon

* getRecords and getRecord now returning the right data and types

* Creating records

* Update records

* Delete records

* The internal properties of integrations are now hidden by the TypeScript types

* Sprinkled a Prettify in there

* Improved the types

* Added Airtable to the integration catalog

* Early work on Airtable webhook registration

* More progress with webhooks

* connectionKey needs to be cloned for webhooks to work

* connectionKey needs to be cloned for webhooks to work

* It was unclear that the ActivateSourceService was using a graphileJob id

* ActivateSourceService optionally takes a jobId, if missing it generate a unique id

* When retrying trigger registration, don’t pass an id so it is generated

* Removed Airtable webhooks tasks from the job-catalog example

* Added TriggerSourceOption, removed TriggerSourceEvent

* WIP with new ExternalSource options

* ExternalSourceTrigger setup

* DynamicTrigger changed to options, will need some more work

* filter gets options passed to it

* SourceMetadata v2 renamed to SourceMetadataV2, kept original

* Started versioning the backend

* Moved param order on io.getEvent and io.cancelEvent

* The runTask stuff that allows unknown to work is back

* Indexing for v1 and v2, with version on “activateSource” schema

* Added todos, to deal with Airtable SDK calls inside the webhook handler

* “deliverHttpSourceRequest” queueName changed to the source id so they process in order

* ActivateSource changes to deal with old and new data formats

* Update existing TriggerSources to v2

* Fix for dynamic.ts typescript errors, need to revisit this later

* UpdateSourceService v1 and v2, with new v2 API endpoint

* Removed unused imports

* More progress on v1 and v2

* Airtable webhooks are now triggering a job

* Moved webhooks to a new file

* You can do API calls in the webhook handler now, Airtable webhook data is being processed

* Airtable events coming through

* Defined the Airtable table payload type

* TriggerSource metadata is being stored and used

* Removed some logs

* Added filtering and don’t allow any webhooks that use automated sources

* Resend switched to new integration

* Moved Resend test jobs to the catalog, and tested it worked

* WIP on Slack, there are compile errors

* Created a generic type that strips out indexes

* Slack updated to use new integration

* SendGrid migrated over

* Integration runTask is now allowing regular types

* Changed io.runTask types so it only allows Json-able types

* OpenAI models tasks working

* Added Airtable changes to runTask

* Removed the index signature crap from the Slack integration

* Don’t need to cast the callback result

* Updated Resend

* Re-ordered runTask params

* WIP on openai

* onAccountUpdated is Connect only

* Removed RunTaskResult

* Handle Resend errors, the official SDK doesn’t expose them properly at the moment

* Removed OmitIndexSignature

* OpenAI converted to new integration, with backwards compatible functions

* Put the openai catalog back to what it was originally

* Export a standard retry with backoff, to be used

* Use the standard exponential backoff in the integrations

* Retry options moved earlier so they can be overriden by a task

* GitHub tasks migrated

* Added sources, fixed one bundling issue

* Added GitHub jobs to catalog

* Remove duplicate options

* Deduplicate events

* Removed duplicate Job

* Switched Plain over

* Set the Plain icon

* Converted Stripe over

* Supabase adapted

* Typeform working

* Added dynamic-schedule to catalog

* Added background-fetch job catalog

* Created dynamic-triggers catalog file

* Fixed old general file with runTask param order

* Dynamic triggers working

* SendGrid updated to use the same tsconfig as other integrations

* Removed Airtable webhook, until we have batch support

* Added OAuth airtable auth example

* Created beta changeset tag

* Beta changesets for most packages

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2023-09-05 14:21:42 +01:00
Eric Allam 3028b6ad9d Try to automatically create github releases when packages are updated 2023-08-28 10:38:01 +01:00
Eric Allam b1b9321ad2 Job run performance improvements and adding "worker only" mode (#360)
* WIP job run performance improvements

- Added a `perf` tool to better measure job run performance under heavy load
- Removed `runFinished` job (not really needed)
- startQueuedRuns now uses a jobKey with replace
- Fixed an issue with ZodWorker when using jobKey

* Publish improvement docker images

* fixed the improvement docker publishing

* Downgrade back to prisma 4.16.0 because 5.1.x broke docker builds

* Changes to how queued runs work

- Split the worker into two different workers, one dedicated to performRunExecution
- Schedule performRunExecution in a single place, with a queue and using a round robin manually controlled concurrency
- Remove startQueuedRuns
- All runs are queued before they are started
- Setting the worker maxPoolSize to the same as the worker concurrency
- Starting to be able to split the docker image

* Remove queue name from startRun graphile job

* Make the prisma connection pool stuff configurable through env vars

* Hardcode (for now) the max concurrent runs limit

* Rewrite performRunExecution to be more performant

PerformRunExecutionV2:

- Does not create and manage jobRunExecution records
- Does not reimplement retrying, uses graphile worker retrying instead

I’ve kept around PerformRunExecutionV1 so this works when deploying. Definitely needs LOTS of testing

* Fix issues with cached tasks

- Limit the size of the cached tasks sent when executing a run, using the knapsack problem dynamic programming approach
- Actually USE the cached tasks in IO by using the idempotencyKey instead of the task ID
- Remove output from all logs
- Added a stress test job catalog

* Forgot to commit the logger updates

* Never log connectionString

* Login to docker hub to get around rate limits

* Add additional logging to the graphile workers

* Fix the *_ENABLED  env vars

* Allow adding and removing jobs to be done from the webapp

* Don’t set the job to failed if it’s being retried

* Deprecated queue options in the job and removed startPosition. Now using the job/env combo as the job queue name

* Dequeung jobs doesn’t check if the runner is initialized

* Fixed issues with retrying a run getting stuck on a cancelled task, and errors from parsing the results of dequeing a job

* Remove queued round robin thing that isn’t used anymore

* Added slack to job catalog

* Better forwards compat

* Added long delay

* Fixed lock file
2023-08-18 15:25:26 +01:00
Sai Hari fa942fc9f5 feat: 🎸 add end-to-end test harness (#253)
* feat: 🎸 add end-to-end test harness

* Address PR comments
2023-08-08 13:55:25 +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
Eric Allam 3e5945fb9e Stop storing github access tokens for github authenticated users 2023-07-31 15:41:44 +01:00
Eric Allam 1dfe7e0ab5 Updated dev-compose.yml and added some scripts to run it in package.json 2023-07-20 10:31:39 +01:00
Eric Allam 520ab88a97 Adding the create-integration command to scaffold out new integration packages (inside or outside of the monorepo) 2023-07-12 13:38:43 +01:00
Eric Allam 04d6e8e7f0 Set the package manager to pnpm 7.18.1 2023-06-29 10:35:22 +01:00
Eric Allam e1d942bb3a Add pnpm run db:studio command to open prisma studio 2023-06-27 11:27:31 +01:00
Eric Allam 03c4d9504f Cleanup the docker compose services stuff 2023-06-26 15:09:31 +01:00
Eric Allam 40ffde33b6 Add isManagedCloud feature, remove sentry, and require custom oauth app on self-hosting 2023-06-22 22:48:57 +01:00
Eric Allam 31d8669c9d Make github auth optional and better name the env vars 2023-06-22 17:42:51 +01:00
Eric Allam 1701d4253d Remove prisma config in package.json 2023-06-22 13:53:46 +01:00
Eric Allam c5d96db9a8 WIP docker github workflow 2023-06-22 13:11:43 +01:00
Eric Allam 8bba30e290 Initial Docker and docker compose setup 2023-06-21 17:07:17 +01:00
Matt Aitken 7fc3ff26bc Rejigged database migrate deploy scripts 2023-06-16 16:30:35 +01:00
Eric Allam 9f49b7f4c0 Move prisma to an internal database package 2023-06-15 14:18:34 +01:00
Eric Allam 214546d17a WIP new stuff 2023-05-16 16:34:51 +01:00
Matt Aitken 1f1cf0cb74 Added Storybook to turbo so you can call it from the root folder 2023-05-09 15:04:30 +01:00
Matt Aitken 0a1d3ed5ef Removed generate-integrations 2023-05-09 14:42:38 +01:00
Eric Allam 98c8893046 WIP connections with authenticated tasks and http triggers 2023-04-06 16:15:17 +01:00
Eric Allam 2d5c2394c8 Initial commit of the new serverless execution runtime 2023-03-31 14:32:00 +01:00
Eric Allam 408bd6ddc8 Added a script to automatically update template repo @trigger.dev packages instead of having to do it manually 2023-03-02 15:34:53 +00:00
Matt Aitken be6954abf2 changeset config for generated-integrations 2023-02-21 11:00:17 +00:00
Matt Aitken f6ed5517c2 Merge branch 'features/new-integrations' into dev 2023-02-21 10:10:15 +00:00
Eric Allam 695e4ca3f0 Split pulsar and the rest of the local docker services 2023-02-20 17:23:42 +00:00
Matt Aitken 3cd4f2fb9f Merge remote-tracking branch 'origin/dev' into features/new-integrations
# Conflicts:
#	apps/webapp/app/env.server.ts
#	apps/webapp/app/models/integrations.server.ts
#	apps/webapp/app/models/organizationTemplatePresenter.server.ts
#	apps/webapp/app/models/templateListPresenter.server.ts
#	apps/webapp/app/models/templatePresenter.server.ts
#	apps/webapp/app/models/workflowListPresenter.server.ts
#	apps/webapp/app/models/workflowStartPresenter.server.ts
#	apps/webapp/app/models/workflowsPresenter.server.ts
#	apps/webapp/app/routes/__app/orgs/$organizationSlug/__org/index.tsx
#	apps/webapp/app/routes/__app/orgs/$organizationSlug/__org/workflows.new.tsx
#	pnpm-lock.yaml
2023-02-20 12:10:50 +00:00
Matt Aitken 67eb592ecc Merge branch 'dev' into main 2023-02-17 16:11:20 +00:00
Vladyslav Matsiiako 1b675968f6 Added infisical as one of the command in package.json 2023-02-14 19:46:36 -08:00
Matt Aitken 63486d21c4 Renamed command to generate-integrations 2023-02-13 14:57:09 +00:00
Matt Aitken fc1dd44f39 Added the new integrations system into the mono-repo 2023-02-13 14:48:12 +00:00
Matt Aitken cf04c3902f Added pnpm run idev command for running the webapp with Infisical secrets injected 2023-02-10 19:56:17 +00:00
Eric Allam 35718033bd Upload source maps to sentry during Docker build 2023-02-07 09:29:15 +00:00
Matt Aitken 64854b128f Added scripts and documentation for doing pre-release changeset versions 2023-02-06 11:51:53 +00:00
Eric Allam f3258ea411 Update all the docs for the new packages 2023-01-30 16:31:02 +00:00
Eric Allam 42648e93ee Added changesets for the new packages 2023-01-30 16:10:43 +00:00
Eric Allam 2ae86d0f0e Remove unnecessary config packages and use explicit workspace reference 2023-01-26 14:20:44 +00:00
Matt Aitken 09896e4252 Added changesets to the project 2023-01-13 14:37:27 +00:00