Commit Graph

5226 Commits

Author SHA1 Message Date
Matt Aitken 78dac99d72 Release 3.0.0-beta.55
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 4s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 2s
🚀 Publish Trigger.dev Docker / units (push) Failing after 19s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
🚀 Publish Trigger.dev Docker / publish-infra (push) Has been skipped
@trigger.dev/airtable@3.0.0-beta.55 @trigger.dev/astro@3.0.0-beta.55 @trigger.dev/cli@3.0.0-beta.55 @trigger.dev/core@3.0.0-beta.55 @trigger.dev/express@3.0.0-beta.55 @trigger.dev/hono@3.0.0-beta.55 @trigger.dev/linear@3.0.0-beta.55 @trigger.dev/nestjs@3.0.0-beta.55 @trigger.dev/nextjs@3.0.0-beta.55 @trigger.dev/otlp-importer@3.0.0-beta.55 @trigger.dev/react@3.0.0-beta.55 @trigger.dev/replicate@3.0.0-beta.55 @trigger.dev/sdk@3.0.0-beta.55 @trigger.dev/shopify@3.0.0-beta.55 @trigger.dev/slack@3.0.0-beta.55 @trigger.dev/stripe@3.0.0-beta.55 @trigger.dev/supabase@3.0.0-beta.55 @trigger.dev/sveltekit@3.0.0-beta.55 @trigger.dev/testing@3.0.0-beta.55 @trigger.dev/typeform@3.0.0-beta.55 @trigger.dev/yalt@3.0.0-beta.55 trigger.dev@3.0.0-beta.55 v.docker.3.0.0-beta.55 v.docker.3.0.0-beta.56 @trigger.dev/github@3.0.0-beta.55 @trigger.dev/plain@3.0.0-beta.55 @trigger.dev/eslint-plugin@3.0.0-beta.55 @trigger.dev/resend@3.0.0-beta.55 @trigger.dev/openai@3.0.0-beta.55 @trigger.dev/integration-kit@3.0.0-beta.55 @trigger.dev/sendgrid@3.0.0-beta.55 @trigger.dev/remix@3.0.0-beta.55 @trigger.dev/core-backend@3.0.0-beta.55
2024-08-20 15:50:14 +01:00
James Ritchie d6786002b2 Full Next.js guide (#1259)
* tasks no longer inside a group in the side menu (and added “cron”)

* Delay using a timezone

* Added React Not Defined error to the troubleshooting page

* Improved the React common problem

* Link to v2 docs

* New Development section and entry in Common Problems

* Concurrently running the terminal

* Fixed the .env weirdness

* Added section on creating PATs for Github actions

* Improved the Machine spec and limits page

* Quick start steps now have nice images

* Added a diagram for the lifecycle functions

* Added note about onFailure

* CRON -> cron/Cron

* WIP adding more steps to the next.js guide

* WIP next.js

* WIP adding tabbed steps for pages/app router

* References to Infisical links to their homepage so it’s clearer

* WIP updating the nextjs guide

* WIP nextjs guide

* More nextjs guide steps

* More copy

* Added rate limit trouble shooting

* Removed old prisma error title

* Added secret key step

* Added a note for logging in using a specified domain if self hosting

* typo

* App router docs copy

* Deploy copy update

* Added a favicon.png to fix a docs build error

* Removed unused snippet

* Server actions now inside a tab

* Server actions + restructured the triggering section

* Added troubleshooting snippet for react event handlers

* Added a new troubleshooting snippet for ESM

* Updated old replaying image to reflect the new UI

* Removed references to reattempting

* Updated replaying from the run page

* Added a bulk replay section

* Updated the writing tasks intro page

* Removed edge runtime code for now

* Added edge runtime – it seems to just work!

* import type
2024-08-20 14:50:39 +01:00
github-actions[bot] 9d529e9f17 chore: Update version for release (beta) (#1264)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-20 14:46:19 +01:00
Matt Aitken d48eb9bac8 Fix: was showing deleted team member dev environments (#1261)
* Env vars: don’t show deleted dev environments

* Concurrency limits: don’t show deleted dev environments

* Create/edit schedule: don’t show deleted dev environments
2024-08-20 14:03:24 +01:00
Matt Aitken 0591db5f2b Fix for short runs inside (batch)triggerAndWait (#1263)
* Test for checkpoints

* Make sourceTaskAttemptId optional on resumeBatchRun

* Removed all completions/executions logic from the shared queue consumer

* Removed the sourceTaskAttemptId from ResumeBatchRunService

* Revert "Removed all completions/executions logic from the shared queue consumer"

This reverts commit d35398d50463c81a1975bb5d5bcfca66a24b8ede.

* WIP on triggerAndWait…

* Fixed triggerAndWait continuing when a checkpoint completes

* Remove the ResumeAttempt code that fails attempts (was protecting against infinite restores)

* Removed messageBody.data.completedAttemptIds.length === 0 commented out code

* Don’t ack if there’s no batchRun

* Added the marqs?.replaceMessage back in but NOT when there’s no checkpoint. More logging

This is a fix for when some attempts fail

* Improvement to the test task that now randomly fails attempts

* When a checkpoint happens, only continue the attempt if it’s in the correct state

* Changeset for rollback in branch

* Set keepRunAlive to false when the dependent task isn’t finished

* Changeset manual version (to get inline with the hotfix branch)

* Changeset: Fixes for continuing after waits

* Latest lockfile (after manual changeset version)
2024-08-20 13:57:08 +01:00
nicktrn a64064965d Prevent runs that fail fast from never sending a heartbeat 2024-08-19 13:17:33 +01:00
Matt Aitken 41ec450bee Revert "Remove the RequeueTaskRunService"
This reverts commit 3421f5ec0b.
2024-08-15 20:43:47 +01:00
Matt Aitken 9a9bdc20c9 Revert "Disable upserting task queues when triggering a task"
This reverts commit 6652edf7a7.
2024-08-15 20:42:50 +01:00
Matt Aitken 6652edf7a7 Disable upserting task queues when triggering a task 2024-08-15 19:34:22 +01:00
Matt Aitken 369bc38560 Instead of upserting taskQueues, do a findFirst then create/update 2024-08-15 18:48:50 +01:00
Matt Aitken 27f7132509 Don’t do the auto-increment inside a transaction, this means triggerTask isn’t inside one 2024-08-15 17:44:10 +01:00
Matt Aitken b6fc68aaae Don’t use Graphile for invocation usage reporting 2024-08-15 17:22:52 +01:00
Matt Aitken 3421f5ec0b Remove the RequeueTaskRunService 2024-08-15 17:20:40 +01:00
Matt Aitken 15097a3a67 Use the replica for the v2 run and task presenters 2024-08-15 15:34:57 +01:00
Matt Aitken 1b7bb90852 Only show the first 1000 task on the v2 run page 2024-08-15 15:26:12 +01:00
Matt Aitken 7e68c02636 Don’t reload v2 run page if more than 100 tasks 2024-08-15 15:25:59 +01:00
nicktrn 01e01376f8 Fix attempt retry mechanics for new workers 2024-08-15 12:13:13 +01:00
James Ritchie db9163e775 Added a note to use batchTrigger() instead of trigger() 2024-08-14 13:25:08 +01:00
nicktrn e9bdd0c7e5 Release 3.0.0-beta.53 @trigger.dev/airtable@3.0.0-beta.53 @trigger.dev/astro@3.0.0-beta.53 @trigger.dev/core-backend@3.0.0-beta.53 @trigger.dev/core@3.0.0-beta.53 @trigger.dev/eslint-plugin@3.0.0-beta.53 @trigger.dev/express@3.0.0-beta.53 @trigger.dev/github@3.0.0-beta.53 @trigger.dev/hono@3.0.0-beta.53 @trigger.dev/integration-kit@3.0.0-beta.53 @trigger.dev/linear@3.0.0-beta.53 @trigger.dev/nestjs@3.0.0-beta.53 @trigger.dev/nextjs@3.0.0-beta.53 @trigger.dev/openai@3.0.0-beta.53 @trigger.dev/otlp-importer@3.0.0-beta.53 @trigger.dev/plain@3.0.0-beta.53 @trigger.dev/react@3.0.0-beta.53 @trigger.dev/remix@3.0.0-beta.53 @trigger.dev/sendgrid@3.0.0-beta.53 @trigger.dev/slack@3.0.0-beta.53 @trigger.dev/stripe@3.0.0-beta.53 @trigger.dev/supabase@3.0.0-beta.53 @trigger.dev/sveltekit@3.0.0-beta.53 @trigger.dev/typeform@3.0.0-beta.53 @trigger.dev/yalt@3.0.0-beta.53 trigger.dev@3.0.0-beta.53 @trigger.dev/replicate@3.0.0-beta.53 @trigger.dev/cli@3.0.0-beta.53 @trigger.dev/shopify@3.0.0-beta.53 @trigger.dev/resend@3.0.0-beta.53 @trigger.dev/sdk@3.0.0-beta.53 @trigger.dev/testing@3.0.0-beta.53 2024-08-14 11:40:38 +01:00
github-actions[bot] 7cb977ff2c chore: Update version for release (beta) (#1256)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-14 11:39:44 +01:00
James Ritchie 2940b07430 Added a description panel to the Concurrency admin page 2024-08-14 11:33:15 +01:00
James Ritchie c46e3c97b5 Fix for schedule page not scrolling 2024-08-14 11:23:16 +01:00
nicktrn 16cb1c46ac Fix restored container names 2024-08-13 18:10:09 +01:00
Matt Aitken 2b0d68a0b6 Include the old message data when replacing, so we get the projectId etc. 2024-08-13 17:09:29 +01:00
James Ritchie 2088fa392d Added depenenciesToBundle guide to bundle all packages 2024-08-13 17:06:42 +01:00
Matt Aitken f1ffc2e6c8 Added messageReplaced to concurrency tracking (when freezing) 2024-08-13 16:36:39 +01:00
Matt Aitken c0b9394099 Call subscriber.messageDequeued in dequeueMessageInSharedQueue 2024-08-13 15:31:25 +01:00
Matt Aitken 937b61913d Added more logging to TaskRunConcurrencyTracker and some more try/catches 2024-08-13 14:54:50 +01:00
nicktrn 5cf90da722 v3: fix unfreezable state crashes for runs with multiple waits (#1253)
* support named capture groups

* write crash errors to attempt.error

* make restored pod names unique per checkpoint

* use last eight characters of checkpoint id instead

* add more chaos monkey env vars

* Ignore unfreezable states

* prevent excessive queue config parsing errors

* handle dependency resume edge case

* better entry point logging

* ignore checkpoint cancellation timeouts

* add missing idempotency keys to wait for dep replays

* remove checkpoints between attempts

* fix retry container names on kubernetes

* add changeset

* fix types

* bring back internal duration timers
2024-08-13 11:44:40 +01:00
Matt Aitken da6ce3c8d5 Concurrency page and more accurate tracking (#1252)
* Initial TaskRunConcurrencyTracker implementation

* MARQS calls a subscriber to events

* When enqueuing add the extra required metadata

* Track concurrency per environment for tasks too

* Admin page for global concurrency

* Use the new concurrency tracker on the tasks page

* Useful performance test task

* getAllTaskIdentifiers()

* New page for concurrency

* BackgroundWorkerTask index for quick lookup of task identifiers

* Added a way to get concurrency for environments

* Added upgrade/request more concurrency button

* Queued task column working

* Use defer and suspense

* Added queue column to the concurrency environments table

* Some comments added for clarity

* Fixed bad log message

* Sidemenu: move lower and rename to “Concurrency limits”

* Only show the environments, not tasks. Renamed to “Concurrency limits”
2024-08-13 11:43:46 +01:00
James Ritchie 07054f13d1 Fixed v2 usage meter displaying when on paid plan (#1255)
* Fixed v2 usage meter displaying when on paid plan

* Show the free usage panel only for v3 projects
2024-08-13 11:14:28 +01:00
nicktrn c50a94b962 Increase indexing memory limit 2024-08-12 17:05:25 +01:00
Matt Aitken bb38261947 FinalizeRunService (#1250)
* WIP notes on each location where we’ll use finalize

* Initial FinalizeTaskRunService

* ExpireEnqueuedRunService uses FinalizeTaskRunService

* FailedTaskRunService uses FinalizeTaskRunService

* Allow passing in an include when finalizing the run

* CrashTaskRunService using FinalizeTaskRunService

* Remove comments

* Status is optional

* CancelAttemptService using FinalizeTaskRunService

* Import tidy

* CancelTaskRunService using FinalizeTaskRunService

* Import tidying

* CompleteAttemptService system failure switched to FinalizeTaskRunService

* Added more logging to Finalizing

* CompleteAttemptStatus COMPLETED_SUCCESSFULLY

* CompletedAttempt “SYSTEM_FAILURE”

* CompletedService final pair

* Use satisfies so we can derive types from the groups

* Only allow final states to be used with this service

* BaseService tx support, minor improvements
2024-08-08 15:32:06 +01:00
James Ritchie 0d4e3e70c1 Lots of small docs improvements (#1251)
* tasks no longer inside a group in the side menu (and added “cron”)

* Delay using a timezone

* Added React Not Defined error to the troubleshooting page

* Improved the React common problem

* Link to v2 docs

* New Development section and entry in Common Problems

* Concurrently running the terminal

* Fixed the .env weirdness

* Added section on creating PATs for Github actions

* Improved the Machine spec and limits page

* Quick start steps now have nice images

* Added a diagram for the lifecycle functions

* Added note about onFailure

* CRON -> cron/Cron

* Updated the cli-dev steps for the concurrently package

* Fixed capital letter

* Updated diagram text

* Removed dead page
2024-08-08 15:03:05 +01:00
nicktrn bf1482fdb9 Save crash errors on the attempt 2024-08-08 11:42:46 +01:00
Matt Aitken e2d3358271 Added error from the run attempt with nice display (#1249) 2024-08-07 15:50:45 +01:00
James Ritchie 6270abaab8 Remove v2 docs pages (#1246)
* Make the tooltip text color grey so it’s readable again the primary color

* Setup and styling for the Guides section

* Better Guides icon

* Improved the prerequisites

* WIP Nextjs guide and new folder structures

* Copy updates

* Useful next steps is now a snippet

* Better icons for the next steps section

* Renamed the “prerequisites” snippet

* Node.js guide

* Added a “Creating a project” guide

* New snippet for prerequisites

* New Remix guide

* Added Remix to the side bar

* Tweaked icons for creating a project page

* Added the hello world step to the onboarding steps

* Better “useful next steps” snippet card links

* Moved prerequisites

* Fixing links to images

* Moved v2 migration page to guides

* Removed dead link

* Attempt fix for redirect

* Fixed redirects

* Getting started section includes link to roadmap

* Removed icon from side menu

* Deleted all v2 pages (excluding updating mint.json)

* Removed v2 pages, redirects and versions from mint.json

* Deleted v2 snippets

* Deleted un-used pages

* Set of more useful coming soon snippets

* All snippets use the updated format

* updated folder “v3/“ with “/pages”

* Moved all main docs files to the route and updated the redirect

* Fixed URLs in the mdx pages to the new route path

* URL goes to the proper pricing page

* Better delayed runs image

* Attempt fix for self hosting page not redirecting
2024-08-07 11:13:45 +01:00
Matt Aitken 6c71ddbe67 TaskRun completedAt index 2024-08-06 17:31:12 +01:00
James Ritchie fafda21e3b V2 end of life messaging, paid plan badge, and project menu improvements (#1245)
* Updated the v2 project message to include end of life

* Removed the v3 badge. Showing a v2 badge instead

* Removed the v3 badge variant

* Show a badge in the side menu if you’re paying

* Popover menu section header and button state colours now reflects the design UI

* Added a link to the blog in the end-of-life message

* Removed missing variant from badge
2024-08-06 10:50:23 +01:00
nicktrn dc2d68107f Revert "Ignore unfreezable states"
This reverts commit 7d9cec8652.
2024-08-06 10:11:28 +01:00
Matt Aitken b65e7f7a7a Show a different message if your logs are deleted but you’re within your retention period.
This happens if you’ve upgraded but the logs were already deleted.
2024-08-06 10:10:40 +01:00
nicktrn 7d9cec8652 Ignore unfreezable states 2024-08-06 08:56:06 +01:00
Matt Aitken a591e1118f Improved the experience when you have no run logs (#1244)
* Remove the old log truncation

* Added TaskRUn logsDeletedAt column

* Accurate timestamps for the run inspector

* EnsureProperty type when you want to make a single property not nullable

* No logs and upgrade messages working

* Button can be autofocused

* Replay dialog code editor is autofocused

* Fix for wrapping of span duration
2024-08-05 18:06:23 +01:00
nicktrn 4d2ea86d6c Use accurate datetime for run timeline 2024-08-05 15:16:43 +01:00
Eric Allam 366ae5ca7d Create a shared queue span every 10 seconds 2024-08-02 17:31:52 +01:00
Eric Allam 157973a720 Force recording shared queue consumer spans 2024-08-02 17:30:27 +01:00
Eric Allam 1353d66ca1 Additional logging to help track down possible issue with MarQS selection algo 2024-08-02 12:27:50 +01:00
Matt Aitken 1c5ee5d94c Added TaskRun completedAt column (#1243)
* Added TaskRun completedAt column

* When finalising a run set the completedAt date

* A note to discuss whether we need to set the completedAt to null

* Remove the note in the sharedQueueConsumer
2024-08-02 10:31:38 +01:00
nicktrn 4a2ad323ae Release 3.0.0-beta.52
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 4s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 0s
🚀 Publish Trigger.dev Docker / units (push) Failing after 4s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
🚀 Publish Trigger.dev Docker / publish-infra (push) Has been skipped
@trigger.dev/airtable@3.0.0-beta.52 @trigger.dev/cli@3.0.0-beta.52 @trigger.dev/core-backend@3.0.0-beta.52 @trigger.dev/core@3.0.0-beta.52 @trigger.dev/eslint-plugin@3.0.0-beta.52 @trigger.dev/express@3.0.0-beta.52 @trigger.dev/github@3.0.0-beta.52 @trigger.dev/hono@3.0.0-beta.52 @trigger.dev/integration-kit@3.0.0-beta.52 @trigger.dev/linear@3.0.0-beta.52 @trigger.dev/nestjs@3.0.0-beta.52 @trigger.dev/nextjs@3.0.0-beta.52 @trigger.dev/openai@3.0.0-beta.52 @trigger.dev/otlp-importer@3.0.0-beta.52 @trigger.dev/plain@3.0.0-beta.52 @trigger.dev/replicate@3.0.0-beta.52 @trigger.dev/resend@3.0.0-beta.52 @trigger.dev/sendgrid@3.0.0-beta.52 @trigger.dev/shopify@3.0.0-beta.52 @trigger.dev/stripe@3.0.0-beta.52 @trigger.dev/sveltekit@3.0.0-beta.52 @trigger.dev/testing@3.0.0-beta.52 @trigger.dev/typeform@3.0.0-beta.52 trigger.dev@3.0.0-beta.52 v.docker.3.0.0-beta.52 @trigger.dev/astro@3.0.0-beta.52 @trigger.dev/react@3.0.0-beta.52 @trigger.dev/supabase@3.0.0-beta.52 @trigger.dev/yalt@3.0.0-beta.52 @trigger.dev/remix@3.0.0-beta.52 @trigger.dev/sdk@3.0.0-beta.52 @trigger.dev/slack@3.0.0-beta.52
2024-08-01 12:59:14 +01:00
github-actions[bot] a49edd3251 chore: Update version for release (beta) (#1237)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-01 12:57:39 +01:00