Commit Graph

4740 Commits

Author SHA1 Message Date
Eric Allam a54bdb23bf Fixed the Docker build (error in generate-protos.mjs) 2024-02-20 13:31:16 +00:00
Eric Allam 07f7c65054 v3 queue system (#903)
* Introducing Modular Asynchronous Reliable Queueing System (MarQS). Works in dev

* Convert MarQS to using lua and dealing with concurrency

* Simplified the timeout queue and current concurrency is now a set instead of a flat value (to support idempotency)

* Implement task heartbeating and reconnect the background workers CLI when the websocket connection reconnects

* Start adding internal telemetry support for the server

* Get env vars to work in dev and implement prisma tracing in webapp

* Cleanup telemetry and implement it in the consumer

* Implement dequeuing a message from a parent shared queue

* Implement a custom logger exporter instead of using console log exporter

* Use node instead of shell for generating protocol buffer code

* Propogate trace context into debug logs, and allow turning off logger exporter through env vars

* Switch to using baselime for internal otel data

* Make orgMember optional to fix type issues

* Provide the CLI dev env vars through the CLI, don’t build dotenv into facade

* Removed the logger import

* Address Matt’s comments

* Addressing more of Matt’s comments

* Handle sending an execution after a websocket connection closes

* Remove auth from the env attributes to prevent obfuscation
2024-02-20 12:16:41 +00:00
Matt Aitken d04c8e89f6 Added a “repo-token” to the Install Protoc GitHub action steps
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 0s
🚀 Publish Trigger.dev Docker / units (push) Failing after 0s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 19s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
v.docker.2.2.39
2024-02-19 14:15:15 +00:00
Matt Aitken b69902dd84 Deduplicate integrations in the JobListPresenter (#901)
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 6s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 1s
🚀 Publish Trigger.dev Docker / units (push) Failing after 19s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
v.docker.2.2.38
2024-02-19 13:13:28 +00:00
Eric Allam 2aabb994cf Install the protobuf compiler in the docker builder stage 2024-02-12 16:58:57 +00:00
Matt Aitken 310d51bac0 Tree view component (#900)
* WIP creating a TreeView component

* Very simple tree displaying

* WIP on TreeView types

* The state is computing properly

* Improved the state and types

* Virtualized rendering

* Added state inside the useTreeState hook

* Selection working

* Deselecting nodes

* Toggle selection

* Expanding/collapsing nodes

* Get notifications when changes are made

* Only try show the visible items

* Experiment to try getting cell animations working

* Renamed hook to useTree

* Keyboard navigation is working

* Proper focus support

* Nice selection of the parent by pressing left

* End selects the last visible node

* Showing how the TreeView can accept a selected id and expanded ids from the outside

* The useTree hook now uses selectedId and collapsedIds to make it easier to use

* Check the inputs are valid before applying them, ignore if they’re not

* Don’t allow a selected node to be hidden by collapsed parents

* Nicer API for the onChange callback

* Supports animated collapsing of the tree view

* Nice smooth scrolling

* Removed logs

* Removed unused key

* Remove intricate estimation

* StandardTreeView has lots of good defaults baked in

* Allow passing of parent class name in

* Work on scrolling to the node… needs a bit of a reshuffle

* Just make the TreeView better rather than adding StandardTreeView

* Renamed rowVirtualizer to virtualizer

* Move the virrtualizer into the hook

* Scrolling to selection is working

* Added filtering
2024-02-12 16:43:47 +00:00
Eric Allam 6be1099a12 Don’t git submodule in docker 2024-02-12 14:53:03 +00:00
Eric Allam baf3a84cda v3 dev cli command + more (#894) @trigger.dev/otlp-importer@2.3.11 2024-02-12 14:24:32 +00:00
Matt Aitken 70f9bd0d70 Latest lockfile @trigger.dev/airtable@2.3.18 @trigger.dev/astro@2.3.18 @trigger.dev/cli@2.3.18 @trigger.dev/core-backend@2.3.18 @trigger.dev/core@2.3.18 @trigger.dev/eslint-plugin@2.3.18 @trigger.dev/express@2.3.18 @trigger.dev/github@2.3.18 @trigger.dev/hono@2.3.18 @trigger.dev/integration-kit@2.3.18 @trigger.dev/linear@2.3.18 @trigger.dev/nestjs@2.3.18 @trigger.dev/nextjs@2.3.18 @trigger.dev/openai@2.3.18 @trigger.dev/react@2.3.18 @trigger.dev/remix@2.3.18 @trigger.dev/replicate@2.3.18 @trigger.dev/resend@2.3.18 @trigger.dev/sdk@2.3.18 @trigger.dev/sendgrid@2.3.18 @trigger.dev/shopify@2.3.18 @trigger.dev/slack@2.3.18 @trigger.dev/stripe@2.3.18 @trigger.dev/supabase@2.3.18 @trigger.dev/sveltekit@2.3.18 @trigger.dev/testing@2.3.18 @trigger.dev/typeform@2.3.18 trigger.dev@1.0.7 @trigger.dev/yalt@2.3.18 @trigger.dev/plain@2.3.18 2024-02-12 13:11:14 +00:00
github-actions[bot] a1860dbaae chore: Update version for release (#899)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-12 13:00:14 +00:00
Matt Aitken d69e4e712d OpenAI integration: retry 400 status code because OpenAI returns this sometimes for no reason (#898) 2024-02-12 12:48:48 +00:00
Matt Aitken 7fae67c47d Fix/autoyield canceled run (#890)
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 3s
🚀 Publish Trigger.dev Docker / units (push) Failing after 16s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 20s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
* Todo for the fix

* If the run has been canceled during execution, don’t do any further processing of the run
v.docker.2.2.37
2024-02-09 11:06:19 +00:00
Matt Aitken 9ae0ca64af Fix edge cases with deleting last org/project (#892)
* If you have an org with no projects, it displays in the project dropdown with a “New project” button

* When creating a new org disable the button whilst it’s doing the request

* If an org already had any deleted projects it couldn’t be deleted…

* When selecting the best project, factor in deleted ones

* Don’t show the cancel button when creating a new org if there are no non-deleted projects

* If a project has already been deleted just return
2024-02-09 11:05:28 +00:00
Matt Aitken da69fa0613 Fixes #886. Removed “public” schema from the JobListPresenter query
🚀 Publish Trigger.dev Docker / units (push) Failing after 4s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 4s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 20s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
v.docker.2.2.36
2024-02-07 16:48:18 +00:00
Matt Aitken 336029b842 Organization renaming, deleting and one-click email unsubscribe (#885)
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 0s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 4s
🚀 Publish Trigger.dev Docker / units (push) Failing after 10s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
* Added the org settings page to the sidebar

* Added loading states when renaming/deleting projects

* Don’t show deleted orgs in the app

* The actual db migration file

* The Org settings page with the actions working

* Don’t remove org members, just leave them

* Don’t show invites from orgs that are deleted

* Allow disabling IntegrationConnections

* Don’t refresh IntegrationConnections that are disabled

* Set all the integrations as disabled

* Updated the unsubscribe checkbox text

* Unsubscribe route

* Use the magic link secret, not the encryption key. Also make the error message more vague

* Only members of the org or project can rename them

* Don’t throw an error if the connection can’t be refreshed, return undefined instead
v.docker.2.2.35
2024-02-07 10:52:50 +00:00
Matt Aitken 29edcd3df9 Rename and delete projects (#880)
🚀 Publish Trigger.dev Docker / units (push) Failing after 0s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 0s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 4s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
* Side menu: selector title changed to project. Changed section headers and made it Slack + Discord

* Added project settings page. Renaming is working

* Added project.deletedAt column

* Deleting projects WIP

* Allow clearing the project from the session

* Don’t load projects that are deleted

* Improved the project selection logic

* Clear the session project id when deleting a project

* Deleting the last project in an org now works. The new project page doesn’t have the sidebar anymore.

* Removed false code comment

* Added the JobRun index back in, using Prisma. Otherwise it tries to remove it on each migration

* Only return environments where the project isn’t deleted. This will block API calls

* Do the project deletedAt check in code, not SQL

* Made it clearer what the code does with a comment and applied the same logic to the public api key
v.docker.2.2.34
2024-02-05 13:14:33 +00:00
Matt Aitken a9ff32418e Fix for when there are no jobs…
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 0s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 4s
🚀 Publish Trigger.dev Docker / units (push) Failing after 4s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
v.docker.2.2.33
2024-01-30 17:35:04 +00:00
Matt Aitken 7358fcb891 Latest lockfile @trigger.dev/airtable@2.3.17 @trigger.dev/astro@2.3.17 @trigger.dev/cli@2.3.17 @trigger.dev/core-backend@2.3.17 @trigger.dev/core@2.3.17 @trigger.dev/eslint-plugin@2.3.17 @trigger.dev/express@2.3.17 @trigger.dev/github@2.3.17 @trigger.dev/hono@2.3.17 @trigger.dev/linear@2.3.17 @trigger.dev/nestjs@2.3.17 @trigger.dev/nextjs@2.3.17 @trigger.dev/openai@2.3.17 @trigger.dev/plain@2.3.17 @trigger.dev/remix@2.3.17 @trigger.dev/replicate@2.3.17 @trigger.dev/sdk@2.3.17 @trigger.dev/slack@2.3.17 @trigger.dev/stripe@2.3.17 @trigger.dev/supabase@2.3.17 @trigger.dev/testing@2.3.17 @trigger.dev/typeform@2.3.17 @trigger.dev/yalt@2.3.17 trigger.dev@1.0.6 @trigger.dev/integration-kit@2.3.17 @trigger.dev/shopify@2.3.17 @trigger.dev/resend@2.3.17 @trigger.dev/react@2.3.17 @trigger.dev/sendgrid@2.3.17 @trigger.dev/sveltekit@2.3.17 2024-01-30 17:07:24 +00:00
Matt Aitken 28052daad9 Faster jobs page (#879)
* Optional next/previous with the list pagination

* Defer the loading of the runs table

* Only return the latest run in a separate query, then do a join in code

* Added a composite index to speed up getting the latest run from a job id
2024-01-30 17:02:04 +00:00
github-actions[bot] 364c8c5f7f chore: Update version for release (#876)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-30 13:36:36 +00:00
Matt Aitken 4b3b418abb Set endpoint URLs to null, instead of deleting them (#878)
🚀 Publish Trigger.dev Docker / units (push) Failing after 4s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 5s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 4s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
* Added Endpoint deletedAt column

* Only show endpoints where they’re not deleted

* Don’t delete Endpoints, set the deletedAt and change their slug name

* Only perform indexing if the endpoint isn’t deleted

* Have a nullable URL for endpoints

* Deal with null URLs throughout the app

* Re-running and retrying behaves properly when there’s no endpoint URL

* Remove console.log

* Better error message when doing a run
v.docker.2.2.32
2024-01-30 10:45:12 +00:00
Matt Aitken 2e354d342c Deleting endpoint working (#875) 2024-01-29 11:57:25 +00:00
Matt Aitken dd879c8e4a Fix api run statuses (#874)
* Added a subtask for testing

* Make it easier to run the CLI from the nextjs reference project

* Copies of the run and statuses endpoints, but without simplifying the run statuses

* Use the new v2 endpoints that give the full run statuses

* Removed unused import

* v2 events endpoint with the full run status info

* Changeset
2024-01-29 11:42:19 +00:00
Matt Aitken af485b9180 Fix custom oauth client (#872)
* A checkbox can now be readonly and not be checkable, with correct styling

* Use readOnly for the hasCustomClient checkbox, not disabled

* Better styling of the disabled state

* The update oauth form too
2024-01-26 17:25:15 +00:00
Matt Aitken a739ebaa88 Tweaked the layout of the usage runs charts so the daily runs are in the box with other run charts 2024-01-26 15:05:52 +00:00
Kritik Jiyaviya 3ebc2578e0 feat: Add daily runs graph (#865)
* feat: Add daily runs graph

* Merge branch 'main' into feat/daily-runs-graph

* update DayRunsChart

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-01-26 15:00:30 +00:00
Kritik Jiyaviya 0b657b33f9 Allow retrying a job run with an invalid payload (#869) 2024-01-26 12:39:23 +00:00
Erin Allison 7ac942dc0e Address unintended type coercion in PageInfoPropertyComponent (#861)
Fixes triggerdotdev/trigger.dev#858

Signed-off-by: Erin Allison <erin@eallison.us>
2024-01-26 09:44:55 +00:00
Matt Aitken 9b12016428 Improved SQL reads for some dashboard pages (#868)
* Pass subscription status into the usage bar

* Page navigation spinner is now blue (was a bit subtle before)

* Better logging of db queries, this will be commented out before the PR is merged

* Select only the required fields

* We don’t need the member count for each org

* WIP redirecting with projectId in session

* Switching projects is now working, without duplicating the project query

* Removed logs in revalidate function

* Removes some unused imports

* ProjectPresenter: removed lots of unused db selects

* Root use defaultShouldRevalidate, not just true

* Simplified the job list query and separated the deleting job modal query

* Use requireUserId instead of requireUser wherever possible

* EventListPresenter query simplified

* Simplified the RunListPresenter query

* Disable query logging

* Use the latest updated version for the job list table

* We need to use the org presenter on the select plan page
2024-01-26 09:41:11 +00:00
Matt Aitken d6b44de4ba Defer the loading of the usage data (#866)
🚀 Publish Trigger.dev Docker / units (push) Failing after 10s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 20s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 19s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
* Updated to the latest remix-typedjson package

* Throw an error if the org isn’t found

* Use defer. Doesn’t work because Date isn’t deserialized correctly

* Use regular defer, typeddefer isn’t working properly…

* Don’t update remix-typedjson, wasn’t needed

* Organize imports
v.docker.2.2.31
2024-01-22 10:26:33 +00:00
Matt Aitken 17df4839d7 Latest lockfile
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 5s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 5s
🚀 Publish Trigger.dev Docker / units (push) Failing after 21s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
@trigger.dev/airtable@2.3.16 @trigger.dev/astro@2.3.16 @trigger.dev/cli@2.3.16 @trigger.dev/core-backend@2.3.16 @trigger.dev/eslint-plugin@2.3.16 @trigger.dev/express@2.3.16 @trigger.dev/github@2.3.16 @trigger.dev/hono@2.3.16 @trigger.dev/integration-kit@2.3.16 @trigger.dev/linear@2.3.16 @trigger.dev/nestjs@2.3.16 @trigger.dev/nextjs@2.3.16 @trigger.dev/openai@2.3.16 @trigger.dev/plain@2.3.16 @trigger.dev/react@2.3.16 @trigger.dev/remix@2.3.16 @trigger.dev/replicate@2.3.16 @trigger.dev/resend@2.3.16 @trigger.dev/sdk@2.3.16 @trigger.dev/sendgrid@2.3.16 @trigger.dev/shopify@2.3.16 @trigger.dev/slack@2.3.16 @trigger.dev/stripe@2.3.16 @trigger.dev/supabase@2.3.16 @trigger.dev/sveltekit@2.3.16 @trigger.dev/testing@2.3.16 @trigger.dev/typeform@2.3.16 @trigger.dev/yalt@2.3.16 trigger.dev@1.0.5 v.docker.2.2.30 @trigger.dev/core@2.3.16
2024-01-21 17:30:21 +00:00
github-actions[bot] e3f78178f7 chore: Update version for release (#864)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-21 17:29:23 +00:00
Kritik Jiyaviya da90ee13c3 fix: Resend integration example comment (#860) 2024-01-21 17:16:26 +00:00
Matt Aitken 583da458ec Changed the minimum interval time period from 60s to 20s (with changeset) 2024-01-21 17:06:09 +00:00
Matt Aitken dcf95c4eb2 Revert "Changeset: Changed the minimum interval time from 60s to 20s"
This reverts commit c272e38de2.
2024-01-21 17:04:11 +00:00
Matt Aitken 32cf5790cb Revert "Changed the minimum interval time from 60s to 20s"
This reverts commit ca78ddc2c2.
2024-01-21 17:04:11 +00:00
Matt Aitken c272e38de2 Changeset: Changed the minimum interval time from 60s to 20s 2024-01-21 16:29:54 +00:00
Matt Aitken ca78ddc2c2 Changed the minimum interval time from 60s to 20s 2024-01-21 16:28:28 +00:00
Matt Aitken 07ed8c346a Fix for enabled env var in docs 2024-01-20 14:01:56 +00:00
Matt Aitken d4391f2e2d Fixed link in io.logger to the run log 2024-01-20 12:54:11 +00:00
Eric Allam 2c328ba93d Fix pnmp lock file again @trigger.dev/airtable@2.3.15 @trigger.dev/astro@2.3.15 @trigger.dev/cli@2.3.15 @trigger.dev/core-backend@2.3.15 @trigger.dev/core@2.3.15 @trigger.dev/eslint-plugin@2.3.15 @trigger.dev/express@2.3.15 @trigger.dev/github@2.3.15 @trigger.dev/hono@2.3.15 @trigger.dev/integration-kit@2.3.15 @trigger.dev/linear@2.3.15 @trigger.dev/nestjs@2.3.15 @trigger.dev/openai@2.3.15 @trigger.dev/plain@2.3.15 @trigger.dev/react@2.3.15 @trigger.dev/remix@2.3.15 @trigger.dev/replicate@2.3.15 @trigger.dev/resend@2.3.15 @trigger.dev/sdk@2.3.15 @trigger.dev/sendgrid@2.3.15 @trigger.dev/shopify@2.3.15 @trigger.dev/slack@2.3.15 @trigger.dev/stripe@2.3.15 @trigger.dev/supabase@2.3.15 @trigger.dev/sveltekit@2.3.15 @trigger.dev/testing@2.3.15 @trigger.dev/typeform@2.3.15 @trigger.dev/yalt@2.3.15 trigger.dev@1.0.4 @trigger.dev/nextjs@2.3.15 2024-01-17 14:50:04 +00:00
github-actions[bot] 68dbc07ee8 chore: Update version for release (#854)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-17 14:49:19 +00:00
Eric Allam 58448243af Fix pnpm i 2024-01-17 14:41:51 +00:00
Eric Allam 6c4047cf21 Fix an issue where runs were stuck executing when a child task failed and the parent task retried 2024-01-17 14:39:06 +00:00
github-actions[bot] 831860eace chore: Update version for release (#853)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-17 14:13:34 +00:00
Matt Aitken db46f2a69a Add explicit return type to deprecated sendEmail function because tsup was complaining 2024-01-17 14:07:45 +00:00
Kritik Jiyaviya 4dd6cf18dc feat: Add support for the new Resend audience API endpoints (#850)
* feat: Add support for the new Resend audience API endpoints

* update pnpm-lock.yaml

* update pnpm-lock.yaml

* Merge branch 'main' into feat/support-for-resend-audience-api

* latest pnpm-lock.yaml

* Create lovely-items-end.md

* Update pnpm-lock.yaml

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-01-17 14:06:45 +00:00
Eric Allam adf66d23b8 Update pnpm lock file
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 5s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 4s
🚀 Publish Trigger.dev Docker / units (push) Failing after 15s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
@trigger.dev/airtable@2.3.13 @trigger.dev/astro@2.3.13 @trigger.dev/cli@2.3.13 @trigger.dev/core-backend@2.3.13 @trigger.dev/core@2.3.13 @trigger.dev/eslint-plugin@2.3.13 @trigger.dev/express@2.3.13 @trigger.dev/github@2.3.13 @trigger.dev/hono@2.3.13 @trigger.dev/integration-kit@2.3.13 @trigger.dev/linear@2.3.13 @trigger.dev/nestjs@2.3.13 @trigger.dev/nextjs@2.3.13 @trigger.dev/openai@2.3.13 @trigger.dev/plain@2.3.13 @trigger.dev/react@2.3.13 @trigger.dev/remix@2.3.13 @trigger.dev/replicate@2.3.13 @trigger.dev/resend@2.3.13 @trigger.dev/sdk@2.3.13 @trigger.dev/sendgrid@2.3.13 @trigger.dev/shopify@2.3.13 @trigger.dev/slack@2.3.13 @trigger.dev/stripe@2.3.13 @trigger.dev/supabase@2.3.13 @trigger.dev/sveltekit@2.3.13 @trigger.dev/typeform@2.3.13 @trigger.dev/yalt@2.3.13 trigger.dev@1.0.2 v.docker.2.2.29 @trigger.dev/testing@2.3.13
2024-01-17 11:15:30 +00:00
github-actions[bot] 5c42831a60 chore: Update version for release (#846)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-17 11:14:52 +00:00
Eric Allam 26f5e7774d Fix yalt.dev connection timeouts by increasing timeout from 1s to 5s (#851)
* Increase the yalt tunnel connection timeout to 5 seconds

* Add changeset
2024-01-17 10:27:57 +00:00