Commit Graph

5018 Commits

Author SHA1 Message Date
Eric Allam 764df23d19 Release 3.0.0-beta.39 @trigger.dev/airtable@3.0.0-beta.39 @trigger.dev/cli@3.0.0-beta.39 @trigger.dev/core-backend@3.0.0-beta.39 @trigger.dev/core@3.0.0-beta.39 @trigger.dev/eslint-plugin@3.0.0-beta.39 @trigger.dev/express@3.0.0-beta.39 @trigger.dev/github@3.0.0-beta.39 @trigger.dev/integration-kit@3.0.0-beta.39 @trigger.dev/linear@3.0.0-beta.39 @trigger.dev/nestjs@3.0.0-beta.39 @trigger.dev/nextjs@3.0.0-beta.39 @trigger.dev/openai@3.0.0-beta.39 @trigger.dev/plain@3.0.0-beta.39 @trigger.dev/react@3.0.0-beta.39 @trigger.dev/remix@3.0.0-beta.39 @trigger.dev/replicate@3.0.0-beta.39 @trigger.dev/resend@3.0.0-beta.39 @trigger.dev/sdk@3.0.0-beta.39 @trigger.dev/sendgrid@3.0.0-beta.39 @trigger.dev/shopify@3.0.0-beta.39 @trigger.dev/slack@3.0.0-beta.39 @trigger.dev/stripe@3.0.0-beta.39 @trigger.dev/supabase@3.0.0-beta.39 @trigger.dev/sveltekit@3.0.0-beta.39 @trigger.dev/testing@3.0.0-beta.39 @trigger.dev/typeform@3.0.0-beta.39 @trigger.dev/yalt@3.0.0-beta.39 trigger.dev@3.0.0-beta.39 @trigger.dev/hono@3.0.0-beta.39 @trigger.dev/otlp-importer@3.0.0-beta.39 @trigger.dev/astro@3.0.0-beta.39 2024-06-19 12:22:19 +01:00
github-actions[bot] 4b961a6ae2 chore: Update version for release (beta) (#1169)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-19 12:21:30 +01:00
Eric Allam 8757fdceef v3: [prod] force flush timeout should be 1s 2024-06-19 12:16:11 +01:00
Eric Allam 2404e88ac5 Add a IMPORTANT note to the ProdTaskRunExecution 2024-06-19 11:16:40 +01:00
Eric Allam 88b36f5090 Add a default on machine preset 2024-06-19 11:07:57 +01:00
Eric Allam b73ae3f927 Release 3.0.0-beta.38 @trigger.dev/airtable@3.0.0-beta.38 @trigger.dev/astro@3.0.0-beta.38 @trigger.dev/cli@3.0.0-beta.38 @trigger.dev/core@3.0.0-beta.38 @trigger.dev/eslint-plugin@3.0.0-beta.38 @trigger.dev/express@3.0.0-beta.38 @trigger.dev/github@3.0.0-beta.38 @trigger.dev/hono@3.0.0-beta.38 @trigger.dev/integration-kit@3.0.0-beta.38 @trigger.dev/linear@3.0.0-beta.38 @trigger.dev/nestjs@3.0.0-beta.38 @trigger.dev/nextjs@3.0.0-beta.38 @trigger.dev/openai@3.0.0-beta.38 @trigger.dev/otlp-importer@3.0.0-beta.38 @trigger.dev/plain@3.0.0-beta.38 @trigger.dev/react@3.0.0-beta.38 @trigger.dev/remix@3.0.0-beta.38 @trigger.dev/replicate@3.0.0-beta.38 @trigger.dev/sdk@3.0.0-beta.38 @trigger.dev/sendgrid@3.0.0-beta.38 @trigger.dev/shopify@3.0.0-beta.38 @trigger.dev/slack@3.0.0-beta.38 @trigger.dev/stripe@3.0.0-beta.38 @trigger.dev/supabase@3.0.0-beta.38 @trigger.dev/sveltekit@3.0.0-beta.38 @trigger.dev/testing@3.0.0-beta.38 @trigger.dev/typeform@3.0.0-beta.38 @trigger.dev/yalt@3.0.0-beta.38 trigger.dev@3.0.0-beta.38 @trigger.dev/core-backend@3.0.0-beta.38 @trigger.dev/resend@3.0.0-beta.38 2024-06-19 10:40:29 +01:00
github-actions[bot] b605b892ac chore: Update version for release (beta) (#1166)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-19 10:39:24 +01:00
Eric Allam 233316f7e8 TaskRun.startedAt will now be lazily migrated 2024-06-18 15:49:14 +01:00
Eric Allam 1b90ffbb8c Add a changeset for the usage tracking PR (I forgot) 2024-06-18 14:56:25 +01:00
Matt Aitken b45ca4e146 If the timezone has changed then we need to reschedule the next scheduled run 2024-06-18 14:49:16 +01:00
Eric Allam 25d15578f7 Remove the update migration 2024-06-18 13:51:29 +01:00
Eric Allam fe865a0f49 Make startedAt backwards compat by giving it a default 2024-06-18 13:16:36 +01:00
Eric Allam 0ed93a748e v3: Remove aggressive otel flush timeouts in dev/prod 2024-06-18 11:48:35 +01:00
Michael Li e02320f65d fix: allow command login to read api url from cli args (#1168)
* fix: allow login to read api url from args

* Create strong-phones-smoke.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2024-06-18 09:43:42 +01:00
Eric Allam 85a543d8ec v3: usage tracking (#1163)
* Starting to measure wall time and cpu time in the workers, and reporting that via otel and to completed task run attempts

* Move usage tracking outside of the executor

* WIP prod usage tracking

* WIP

* WIP custom fetch to openmeter

* Create a usage client

* WIP

* WIP

* Implement new machine preset stuff and send usage reports to OpenMeter from webapp

* WIP

* Expose usage info to the client

* Add usage and cost to TaskEvent

* Add ability to globally configure the task machine preset

* Report start run usage

* Change the machine docs to use presets

* setExpirationTime to 24h

* Removed logs

* Update machines.mdx

* Removed console.logs

* Handle revalidating JWT tokens

* Couple tweaks

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-06-18 09:40:23 +01:00
Ryan Lee 10ceb85a92 fix: cloudfront timeouts not being caught (#1162) 2024-06-14 15:11:39 +01:00
Matt Aitken c405ae7117 Schedule limits and timezone support (#1165)
* Added maximumScheduleInstancesLimit column to Org, default to 20

* Docs on the schedule limits and improved soft-limit communication

* Added limit info to the schedules list page

* Created a task that creates schedules, useful for testing

* Make deduplicationKey required when creating/updating a schedule using the SDK

* New schedule button shows an alert if you’re over the limit

* Added timezone to the form and db

* WIP on the timezone dropdown for the create/edit schedule form

* Use the new filter search for timezones

* Made the timezone dropdown faster by fixing the virtualization

* The preview table is working and added a nice message about daylight savings

* Created a page where you can view the full list of timezones

The URL is included in the error message if you send an invalid time using the SDK

* Creating tasks with the timezone

* Added timezone support the the scheduler and the schedules list

* Added timezone support to more of the schedules UI

* The timezone comes through to scheduled runs with nice JSDocs

* Allow setting the timezone from the SDK

* Always have a timezone on a schedule

* Updated jsdocs

* Updated catalog example

* Changed the column to be a string, not null. Added the timezone across the SDK

* API endpoint for getting the timezones

* Added an SDK function to get the list of timezones

* Added timezones to the docs

* Changeset: Added timezone support to schedules

* Added support for testing timezone

* Tidied up imports

* Imports

* Imports

* Update limits.mdx

* Fixed a couple type issues and use the already exported zodfetch

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2024-06-14 13:31:27 +01:00
nicktrn 3687fcb61e Make pod cleaner interval configurable 2024-06-14 12:12:42 +01:00
Émile Ré d4ccdf7105 v3 CLI compiling E2E test suite (#1135)
* Boilerplate server-only use case

* wip: integration suite instrumentation setup

* Working poc testing compileProject

* Add pnpm script to run e2e tests only

* Use vitest globals

* Remove commented line

* Remove useless export

* Add modifier to test only one fixture project

* Handle package manager and log level choice

* Update server-only example

* Setup / teardown + split compile for package manager capabilities

* Ignore yarn files

* Fix issue with corepack, store version in engines field

* Rename test file

* Fix npm updates yarn.lock

* Move typecheking in a dedicated test

* Stop bundling the compile command to allow for more granular testing

* Put config resolving in separate test

* Add no-config test case and add test case expected errors configuration

* Add wantCompilationError option

* Add dependencies handling

* Use packageManager passed as option to resolve required deps

* Remove unused guard clauses

* Add postinstall & hash handling step

* Add worker start test

* Handle yarn.lock copy renaming on sigterm and sigkill

* Update vitest and use concurrent option

* Add a readme file

* Add CI workflow

* Fix handle cli deps

* Run cli v3 e2e tests on publish action

* Increase timeout on deps resolving step

* Add changeset

* Remove .pnp.cjs as we use yarn with nodeLinker node-modules

* Add missing .yarnrc.yml file

* No need to build CLI to run E2E tests

* Remove bun.lockb files

* Update beige-pears-explode.md

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2024-06-14 11:28:36 +01:00
nicktrn e08b4569e5 Improve checkpoint restore logging 2024-06-13 10:18:41 +01:00
nicktrn 79da0ca9b5 Update lockfile @trigger.dev/airtable@3.0.0-beta.37 @trigger.dev/cli@3.0.0-beta.37 @trigger.dev/core@3.0.0-beta.37 @trigger.dev/eslint-plugin@3.0.0-beta.37 @trigger.dev/github@3.0.0-beta.37 @trigger.dev/hono@3.0.0-beta.37 @trigger.dev/integration-kit@3.0.0-beta.37 @trigger.dev/linear@3.0.0-beta.37 @trigger.dev/nestjs@3.0.0-beta.37 @trigger.dev/nextjs@3.0.0-beta.37 @trigger.dev/otlp-importer@3.0.0-beta.37 @trigger.dev/plain@3.0.0-beta.37 @trigger.dev/react@3.0.0-beta.37 @trigger.dev/remix@3.0.0-beta.37 @trigger.dev/replicate@3.0.0-beta.37 @trigger.dev/resend@3.0.0-beta.37 @trigger.dev/sendgrid@3.0.0-beta.37 @trigger.dev/shopify@3.0.0-beta.37 @trigger.dev/slack@3.0.0-beta.37 @trigger.dev/supabase@3.0.0-beta.37 @trigger.dev/sveltekit@3.0.0-beta.37 @trigger.dev/testing@3.0.0-beta.37 @trigger.dev/typeform@3.0.0-beta.37 trigger.dev@3.0.0-beta.37 @trigger.dev/core-backend@3.0.0-beta.37 @trigger.dev/stripe@3.0.0-beta.37 @trigger.dev/yalt@3.0.0-beta.37 @trigger.dev/sdk@3.0.0-beta.37 @trigger.dev/openai@3.0.0-beta.37 @trigger.dev/astro@3.0.0-beta.37 @trigger.dev/express@3.0.0-beta.37 2024-06-12 17:37:58 +01:00
github-actions[bot] 3aca603a33 chore: Update version for release (beta) (#1153)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-12 17:34:47 +01:00
Eric Allam c9e97d6b78 Add debug logging when we skip importing a resource span 2024-06-12 17:27:12 +01:00
nicktrn 01633c9c03 Print error logs on dev worker failure 2024-06-12 13:08:50 +01:00
nicktrn 691990d79e Remove catalog example that was causing typecheck issues 2024-06-12 12:48:19 +01:00
nicktrn b2ba403dd3 Improve error logs cli message 2024-06-12 12:04:59 +01:00
nicktrn 1d47cab69f Ensure rollback triggers execution of tasks waiting for deploy 2024-06-12 11:51:51 +01:00
nicktrn e23047f9ad update pre-release script 2024-06-12 09:49:47 +01:00
nicktrn 68d32429b6 v3: checkpoint failover and misc fixes (#1157)
* configurable checkpoint registry namespace

* add missing task create await

* remove unused messages

* changeset

* update self-hosting docs

* capture and display stderr for failed deploys

* add missing lockfile changes

* stderr changeset

* fix cli stderr message

* update error logs label
2024-06-11 14:06:50 +01:00
Eric Allam 36ac79ac66 Make sure users cannot revoke invites for other orgs 2024-06-11 11:09:52 +01:00
Eric Allam ca94f0cac3 cli v3: fix deploys by using sub-path imports (fixes execa require ESM error) 2024-06-11 11:08:15 +01:00
nicktrn a5d8e453a5 v3: deploy rollbacks (#1154)
* add deployment rollbacks

* update test presenter

* update task list presenter

* fix test page for dev env

* read replica for the test presenter
2024-06-11 10:09:29 +01:00
Eric Allam c332519e72 v3: Add a much needed index on TaskEvent.spanId 2024-06-10 20:54:13 +01:00
Matt Aitken 52112c3bfc Docs: added v3 limits page 2024-06-10 16:07:08 +01:00
Eric Allam eae294a332 Add back in the v2 timeout task thing 2024-06-10 16:06:21 +01:00
Eric Allam 465cd0335c v2: No longer eagerly timeout runs when no tasks are created 2024-06-10 14:54:22 +01:00
nicktrn 35dbaedf69 v3: self-hosting (#1147)
* add amin email regex env var

* fix displayed init command for self-hosted setups

* shared env var to disable telemetry in cli and webapp

* pin sdk version during init

* if specified, add api url to dev command shown after init

* improve checkpoint support detection

* control forced checkpoint simulation via env var

* add public init to providers

* better checkpoint support check for coordinator

* add docker to coordinator image

* update docker provider containerfile

* bump remaining containers to node 20

* add infra image build to default publish workflow

* lockfile

* remove concurrency group from infra workflow

* add docker provider to build matrix

* fix var subst

* checkpoint test is docker specific

* enable v3 projects by default on self-hosted instances

* fix v3 setup command again

* add default posthog key

* self-hosting docs

* add latest tags to versioned infra and webapp builds

* some checkpoint errors should skip retrying

* add changeset

* shorten paragraph

* some docs updates

* update tunnelling section

* add registry setup section

* use correct cli push flag

* add checkout to v3 branch

* update the worker machine setup steps

* fix infra build

* small docs update

* remove unused feature function

* Revert "remove unused feature function"

This reverts commit cfe07887a12b6893dca8ce499964481a9b3dc9db.

* fix self-hosted v3 feature gate

* add note about missing arm support

* simplify helper script syntax
2024-06-10 14:13:04 +01:00
Eric Allam c11a77f50b cli v3: increase otel force flush timeout to 30s from 500ms 2024-06-07 20:46:03 +01:00
Eric Allam fb52b9efea Remove redundant log (you’re welcome baselime) 2024-06-07 20:41:34 +01:00
Matt Aitken 0896b9fffc Use the read replica more (#1152)
* Switch to read replica: getEvent API endpoint

* Switch to read replica: v2 run list presenter

* Switch to read replica: Job presenter

* Switch to read replica: Job list presenter

* Switch to read replica: billing client

* Switch to read replica: OrgUsagePresenter

* Switch to read replica: OrgBillingPlanPresenter

* Switch to read replica: ScheduleListPresenter

* Switch to read replica: EventRepository taskEvent.findMany
2024-06-07 15:47:54 +01:00
Matt Aitken 3a2dd983c5 Fix for sendEvent same id causing multiple runs (#1151)
* Proof of concept

* When ingesting events, if it’s already been delivered then don’t continue

* DeliverEvent: throw AlreadyDeliveredError and don’t retry if that’s thrown

* Test for duplicate event ids

* Return the original event so sendEvent doesn’t fail, don’t enqueue

* Add AlreadyDeliveredError to the logged out message

---------

Co-authored-by: Eric Allam <eallam@icloud.com>
2024-06-07 15:10:53 +01:00
Eric Allam a627ca67d1 Use a different logger key for the marqs version 2024-06-07 14:19:05 +01:00
Eric Allam afc180aa70 marqs: Concurrency monitor that runs periodically and vacuums completed runs (#1150) 2024-06-07 13:36:02 +01:00
Eric Allam 393af1b7c5 Add ability to enable v2 marqs requeuing (and remove deprecated marqs visibility requeuing) 2024-06-06 17:14:15 +01:00
Eric Allam 6a91fb89b8 Release 3.0.0-beta.36 @trigger.dev/airtable@3.0.0-beta.36 @trigger.dev/astro@3.0.0-beta.36 @trigger.dev/cli@3.0.0-beta.36 @trigger.dev/core-backend@3.0.0-beta.36 @trigger.dev/core@3.0.0-beta.36 @trigger.dev/eslint-plugin@3.0.0-beta.36 @trigger.dev/github@3.0.0-beta.36 @trigger.dev/hono@3.0.0-beta.36 @trigger.dev/integration-kit@3.0.0-beta.36 @trigger.dev/linear@3.0.0-beta.36 @trigger.dev/nestjs@3.0.0-beta.36 @trigger.dev/nextjs@3.0.0-beta.36 @trigger.dev/openai@3.0.0-beta.36 @trigger.dev/otlp-importer@3.0.0-beta.36 @trigger.dev/plain@3.0.0-beta.36 @trigger.dev/react@3.0.0-beta.36 @trigger.dev/remix@3.0.0-beta.36 @trigger.dev/replicate@3.0.0-beta.36 @trigger.dev/resend@3.0.0-beta.36 @trigger.dev/sdk@3.0.0-beta.36 @trigger.dev/sendgrid@3.0.0-beta.36 @trigger.dev/shopify@3.0.0-beta.36 @trigger.dev/slack@3.0.0-beta.36 @trigger.dev/stripe@3.0.0-beta.36 @trigger.dev/supabase@3.0.0-beta.36 @trigger.dev/sveltekit@3.0.0-beta.36 @trigger.dev/typeform@3.0.0-beta.36 @trigger.dev/yalt@3.0.0-beta.36 trigger.dev@3.0.0-beta.36 @trigger.dev/testing@3.0.0-beta.36 @trigger.dev/express@3.0.0-beta.36 2024-06-06 16:00:07 +01:00
github-actions[bot] df7d1de16d chore: Update version for release (beta) (#1142)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-06 15:59:21 +01:00
Eric Allam 8e8ed4a3bf Remove queueName option from ZodWorker 2024-06-06 14:49:45 +01:00
Eric Allam 8fc8f57b39 v2: MarQS powered job executions (#1149)
* WIP

* Allow marqsv2 and v2 graphile to run in parallel

* Fix missing GraphileLogger import

* Fixed heartbeat after rebase

* Replace postgres based run counters with redis ones with a backfill

* Add back in the graphile logger

* Remove duplicate visibility timeout calls

* Clamp simple weighted strategy to max of 5
2024-06-06 13:56:27 +01:00
Eric Allam 9ebd91ccec Fixed auto-pagination example 2024-06-06 13:26:16 +01:00
Eric Allam 665f7c9756 v3: runs.retrieve fixed payload value 2024-06-06 13:21:59 +01:00