Commit Graph

5178 Commits

Author SHA1 Message Date
Jacob Paris d934feb02a feature: add no-trigger-core-import (#1175)
* feature: add no-trigger-core-import

* fix: handle aliases and limit to exported modules

* fix: use longest export map name

* fix: support export type and interface

* fix: simplify message when export map is needed

* feature: fine grained modules for core

* fix: add prerequisite lint plugins

* fix: why do I have to fix these components again???

* fix: tests

* Add eslint config and vscode settings

* Create yellow-roses-arrive.md

* Remove the vscode linting

This is temporary so no one fixes these until we merge the remix branch

---------

Co-authored-by: Eric Allam <eric@trigger.dev>
Co-authored-by: Eric Allam <eallam@icloud.com>
Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-07-11 15:14:55 +01:00
Eric Allam 7fdedf3137 Fix excessive logs from the MarQS rebalancer 2024-07-11 14:20:59 +01:00
Eric Allam f6e23e94d1 Ensure failed migrations fail deployment by not swallowing exit codes in entrypoint.sh 2024-07-11 13:22:40 +01:00
Matt Aitken 3d6cfe5ead Admin API endpoint that adds v3 staging environments, and updates their concurrency 2024-07-11 10:22:21 +01:00
nicktrn 946efd1fb4 v3: deployment index retry (#1205)
* add built at date to worker deployments

* stay on correct deployment page when clicking row

* expose built at via presenters

* more specific deployment statuses

* add deployment indexing retry

* improve deploy timeout logs and add dequeue on completion

* unify deployment indexing retryable status

* only allow index retries of the latest deployment

* improve jsxfu
2024-07-10 17:54:36 +01:00
Matt Aitken 3d645e2b2c Fix for usage of zero displaying weirdly 2024-07-10 17:31:40 +01:00
Matt Aitken 45cb75b8a3 Only show dev runs in the tasks usage table 2024-07-10 17:22:35 +01:00
Matt Aitken 91d45e5ba6 Added a link to the pricing page for machines 2024-07-10 17:04:29 +01:00
James Ritchie fa5b3fe11e Only show the github verified badge on the Select Plan onboarding route 2024-07-10 16:50:52 +01:00
James Ritchie 90506322b5 Hide the tooltip content on the usage graph 2024-07-10 16:46:10 +01:00
Matt Aitken e59dd465d8 Documented the task usage functions 2024-07-10 15:19:45 +01:00
Matt Aitken 98d5f005e4 Added delay to the docs and improved the ttl 2024-07-10 10:28:49 +01:00
Matt Aitken a6b5d2edc5 Added ttl to trigger docs 2024-07-10 09:41:09 +01:00
Matt Aitken f4a1d5f36d Removed broken links from writing tasks page 2024-07-10 06:35:41 +01:00
Matt Aitken 6fb6cb6aaf Docs: added alerts link from feature matrix 2024-07-10 06:35:41 +01:00
Eric Allam 0b6417f1d8 Improve the section on adding trigger.dev to dev deps 2024-07-09 21:37:37 +01:00
Matt Aitken a685f5a4ec Removed the enable/disable v3 from the admin area 2024-07-09 19:00:19 +01:00
Matt Aitken 62532d5ce1 Fix for package name mistake 2024-07-09 15:53:03 +01:00
Matt Aitken 786d5508f0 Cover upgrading dev dependency 2024-07-09 15:52:42 +01:00
Matt Aitken 187f02780b Added upgrading packages guide 2024-07-09 15:49:46 +01:00
Eric Allam b8b3ea07eb Release 3.0.0-beta.48
🚀 Publish Trigger.dev Docker / typecheck (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.48 @trigger.dev/astro@3.0.0-beta.48 @trigger.dev/cli@3.0.0-beta.48 @trigger.dev/core-backend@3.0.0-beta.48 @trigger.dev/core@3.0.0-beta.48 @trigger.dev/eslint-plugin@3.0.0-beta.48 @trigger.dev/express@3.0.0-beta.48 @trigger.dev/github@3.0.0-beta.48 @trigger.dev/hono@3.0.0-beta.48 @trigger.dev/integration-kit@3.0.0-beta.48 @trigger.dev/linear@3.0.0-beta.48 @trigger.dev/nestjs@3.0.0-beta.48 @trigger.dev/nextjs@3.0.0-beta.48 @trigger.dev/openai@3.0.0-beta.48 @trigger.dev/otlp-importer@3.0.0-beta.48 @trigger.dev/plain@3.0.0-beta.48 @trigger.dev/react@3.0.0-beta.48 @trigger.dev/remix@3.0.0-beta.48 @trigger.dev/replicate@3.0.0-beta.48 @trigger.dev/resend@3.0.0-beta.48 @trigger.dev/sdk@3.0.0-beta.48 @trigger.dev/sendgrid@3.0.0-beta.48 @trigger.dev/shopify@3.0.0-beta.48 @trigger.dev/slack@3.0.0-beta.48 @trigger.dev/stripe@3.0.0-beta.48 @trigger.dev/supabase@3.0.0-beta.48 @trigger.dev/testing@3.0.0-beta.48 @trigger.dev/typeform@3.0.0-beta.48 trigger.dev@3.0.0-beta.48 v.docker.3.0.0-beta.48 @trigger.dev/sveltekit@3.0.0-beta.48 @trigger.dev/yalt@3.0.0-beta.48
2024-07-09 14:06:41 +01:00
github-actions[bot] e341df806c chore: Update version for release (beta) (#1209)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-09 14:05:49 +01:00
Eric Allam ecf1110ab7 v3: Export AbortTaskRunError from @trigger.dev/sdk/v3 2024-07-09 14:00:44 +01:00
Eric Allam 9ed97b3996 Release 3.0.0-beta.47 @trigger.dev/airtable@3.0.0-beta.47 @trigger.dev/astro@3.0.0-beta.47 @trigger.dev/cli@3.0.0-beta.47 @trigger.dev/core-backend@3.0.0-beta.47 @trigger.dev/core@3.0.0-beta.47 @trigger.dev/eslint-plugin@3.0.0-beta.47 @trigger.dev/express@3.0.0-beta.47 @trigger.dev/github@3.0.0-beta.47 @trigger.dev/hono@3.0.0-beta.47 @trigger.dev/integration-kit@3.0.0-beta.47 @trigger.dev/linear@3.0.0-beta.47 @trigger.dev/nestjs@3.0.0-beta.47 @trigger.dev/nextjs@3.0.0-beta.47 @trigger.dev/openai@3.0.0-beta.47 @trigger.dev/otlp-importer@3.0.0-beta.47 @trigger.dev/plain@3.0.0-beta.47 @trigger.dev/react@3.0.0-beta.47 @trigger.dev/remix@3.0.0-beta.47 @trigger.dev/replicate@3.0.0-beta.47 @trigger.dev/resend@3.0.0-beta.47 @trigger.dev/sdk@3.0.0-beta.47 @trigger.dev/sendgrid@3.0.0-beta.47 @trigger.dev/shopify@3.0.0-beta.47 @trigger.dev/slack@3.0.0-beta.47 @trigger.dev/stripe@3.0.0-beta.47 @trigger.dev/supabase@3.0.0-beta.47 @trigger.dev/testing@3.0.0-beta.47 @trigger.dev/typeform@3.0.0-beta.47 trigger.dev@3.0.0-beta.47 @trigger.dev/sveltekit@3.0.0-beta.47 @trigger.dev/yalt@3.0.0-beta.47 2024-07-09 12:25:02 +01:00
github-actions[bot] 2f14e5136d chore: Update version for release (beta) (#1203)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-09 12:24:09 +01:00
nicktrn 1249523922 Switch from latest to v3 tag for versioned container images 2024-07-09 10:27:35 +01:00
Matt Aitken 9ba5dbaf91 When manipulating dates for periods force UTC 2024-07-09 09:25:08 +01:00
Eric Allam 16ad595338 v3: update @depot/cli to latest 0.0.1-cli.2.71.0 2024-07-08 19:33:15 +01:00
Matt Aitken 681bb729e9 Added GitHub verification failed route 2024-07-08 18:48:39 +01:00
Matt Aitken 07fb3fd90d When replaying and they’re out of credits return undefined so we can deal with it 2024-07-08 18:48:36 +01:00
Matt Aitken 3bfebc06cf When running a test and they’ve run out of credits, show an error message 2024-07-08 18:48:12 +01:00
Matt Aitken 30f7866e17 Send different error if they’ve run out of credits 2024-07-08 18:47:52 +01:00
Eric Allam 46789292b5 Add back in the run link when calling trigger 2024-07-08 17:59:48 +01:00
Eric Allam e04d44866f v3: better handle null unicode characters when creating task events and completing a failed attempt 2024-07-08 15:59:19 +01:00
Matt Aitken d48d9a0e00 Removed invite-only from readme 2024-07-08 15:23:27 +01:00
Matt Aitken 72f3a4b128 Usage and billing (v3) (#1201)
* v3 subscription endpoints

* Use pnpm linked billing package during development

* Moved v2 billing components into a subfolder

* Select plan using the real data

* Improved v3 plan display

* Use new api response that doesn’t require a Stripe call

* Free flow is working

* Added GitHub modal and verified badge

* Deleted old request v3 access component/route

* Allow setting classes on the Tooltip button

* Paid plans working

* Redirect from select plan if you’ve got v3 enabled

* Loading state improvements

* New admin API endpoint to set concurrency across multiple environments

* When projects are created, conditionally create staging based on the plan

* New billing page working with side menu and stripe portal

* Layout, formatting and some plan state improvements/fixes

* Don’t show the period if you’re on the free plan

* Temporary upgrade callout

* Refactored the platform code so it’s easier to call and doesn’t require a isManagedCloud check

* Send taskIdentifier to OpenMeter

* Side menu

* Upgrade prompts

* More improvements to the app-wide usage indicators

* Early work on usage graphs

* Added the usage bar for v3

* Moved code to presenter and now using defer

* Added the tasks table to usage

* Improved the v3 usage bar if theres’ no usage on a paid plan

* If no run data, still render a graph

* Usage page errors when defered loading fails

* Don’t show the public API key for v3, they’re not used and probably never will be

* Improved the upgrade callout and API keys page layout

* Only show the “reveal all” toggle if you have environment variables in the table

* Replaced Upgrade callout with a more generic InfoPanel component

* better panel width

* Show conditional upgrade prompts based on plan and number of schedules used

* Removed duplicate class

* Wider blank state panels for the scheduled page

* Wider info panel for the env var page

* Blank state now using the info panel

* Platform alerts prompt now using the InfoPanel

* Deploy blank state uses InfoPanel

* Github verified badge padding adjustment

* Improved the layout of the page, some style tweaks, organized imports

* Better default tooltip style

* could be undefined fix

* text fix + style updates

* Changed the billing icon in the side menu

* Billing page layout and style improvements

* plan tooltips don’t use dark variant

* Don’t highlight the plan on the billing page

* Tooltip underlines stand out more

* Fixed padding in the PageTitle

* Tooltips use the correct cursor

* Improved the plan banner on the billing page

* Fixed Header1 inconsistent font weight

* Fixed issue where input field focus states were being clipped

* Fixed large button not having large text size

* Added a link to the Get in touch copy and improved the connect to GitHub modal

* Select plan page uses the MainCenteredContainer

* Better logging from the Loops endpoint because this error finally got hit

* Move the ingestion of compute to the platform

* Reporting usage of invocations moved to the platform

* Get the entitlement before triggering a non-dev task

* Contact us enterprise plan button opens the feedback form

* Removed Github discussions link from the Feedback panel

* Swapped billing icon for credit card

* Show a Unlock staging panel on the env var page

* Updated staging environment colour

* Show a prompt to upgrade to get staging in the new env var modal

* Improved the edit env var modal

* Implement ability to disable org concurrency

* Use common logic for the plans

* Use the billing server to get the schedule limits

* Some schedules page fixes

* More convenient way of getting a limit

* Use the new schedule limit

* Team member limiting

* Made the limit visible on the team page

* Limit alerts

* Added an index for TaskRun.scheduleId

* Remove console.log on schedules page

* Added durations to the run table

* Tabular numbers

* Improved the usage page formatting

* Only admins see the compute column on the run table

* Include the base cost on the usage stats

* Moved the status to the sidebar

* Optional table header tooltip

* Allow InfoIconTooltips to have customizable content styles

* Added a tooltip to the duration header, changed no test to a dash

* Removed all references to signing up to v3 from the docs

* Switched @trigger.dev/billing to @trigger.dev/platform

* Passing up the variant for the InfoIconTooltip

* table tooltip max-width fixed

* Switch to the published @trigger.dev/platform 1.0.11

* v2 usage page title changed to include “v2"

* code theme has a transparent background so it works on any background

* duration columns now grouped together nicely at wide screen size

* Last duration column fills the width properly

* Fix for the per run price being in cents not dollars

* Show the total cost with 8 decimal places

* Show 8 decimal places in the usage graph tooltip

* Moved the UpgradePrompt to the v3 folder

* Prepare to use Shadcns chart helpers

* Much nicer chart

* Small tweaks to the graph

* Fix run table col spans for empty/loading messages

* We don’t need isManagedCloud in createProject

* Hide v3 usage/billing pages if there aren’t v3 projects in your org

* Removed unused tooltipStyle

* Usage bar now says “Included usage” instead of “Tier limit” if you’re paying

* Get the plan/usage data in parallel

* The usage page now has a month dropdown and all data is for that calendar month

* Ensure the passed date is the 1st of the month

* Use the machine presets from the platform package

---------

Co-authored-by: James Ritchie <james@jamesritchie.co.uk>
Co-authored-by: Eric Allam <eallam@icloud.com>
2024-07-08 14:42:19 +01:00
Eric Allam 305a6cebd4 Add tasks.triggerAndWait SDK function 2024-07-08 11:48:33 +01:00
James Ritchie c9ac6ef93f Made the bulk action bar taller, bigger buttons and more colour. (#1202) 2024-07-05 19:19:29 +01:00
Dan d2d54c9bc4 v3 readme update (#1197)
* v3 readme update

* Added self-hosting link
2024-07-05 10:35:28 +01:00
Dan a440101af4 Updated the codeblock colours (#1195) 2024-07-05 10:34:56 +01:00
Eric Allam 4f95c9de4e v3: Cancel awaited subtasks and reliable rate-limit recovery (#1200)
* v3: cancel subtasks when parent task runs are cancelled

* v3: recover from server rate limiting errors in a more reliable way

- Changing from sliding window to token bucket in the API rate limiter, to help smooth out traffic
- Adding spans to the API Client core & SDK functions
- Added waiting spans when retrying in the API Client
- Retrying in the API Client now respects the x-ratelimit-reset
- Retrying ApiError’s in tasks now respects the x-ratelimit-reset
- Added AbortTaskRunError that when thrown will stop retries
- Added idempotency keys SDK functions and automatically injecting the run ID when inside a task
- Added the ability to configure ApiRequestOptions (retries only for now) globally and on specific calls
- Implement the maxAttempts TaskRunOption (it wasn’t doing anything before)

* Adding some docs about the request options

* Fix type error

* Remove context propagation through graphile jobs

* Remove logger

* only select a subset of task run columns

* limit columns selected in batchTrigger as well

* added idempotency doc

* allow scoped idempotency keys, and fixed an issue with the unique index on BatchTaskRun and TaskRun

* Removed old cancel task run children code
2024-07-05 10:30:52 +01:00
nicktrn b53a575464 Release 3.0.0-beta.46 @trigger.dev/airtable@3.0.0-beta.46 @trigger.dev/astro@3.0.0-beta.46 @trigger.dev/cli@3.0.0-beta.46 @trigger.dev/core@3.0.0-beta.46 @trigger.dev/eslint-plugin@3.0.0-beta.46 @trigger.dev/express@3.0.0-beta.46 @trigger.dev/github@3.0.0-beta.46 @trigger.dev/hono@3.0.0-beta.46 @trigger.dev/integration-kit@3.0.0-beta.46 @trigger.dev/linear@3.0.0-beta.46 @trigger.dev/nestjs@3.0.0-beta.46 @trigger.dev/nextjs@3.0.0-beta.46 @trigger.dev/openai@3.0.0-beta.46 @trigger.dev/otlp-importer@3.0.0-beta.46 @trigger.dev/plain@3.0.0-beta.46 @trigger.dev/remix@3.0.0-beta.46 @trigger.dev/replicate@3.0.0-beta.46 @trigger.dev/resend@3.0.0-beta.46 @trigger.dev/sdk@3.0.0-beta.46 @trigger.dev/sendgrid@3.0.0-beta.46 @trigger.dev/shopify@3.0.0-beta.46 @trigger.dev/slack@3.0.0-beta.46 @trigger.dev/supabase@3.0.0-beta.46 @trigger.dev/testing@3.0.0-beta.46 @trigger.dev/typeform@3.0.0-beta.46 @trigger.dev/yalt@3.0.0-beta.46 trigger.dev@3.0.0-beta.46 @trigger.dev/sveltekit@3.0.0-beta.46 @trigger.dev/core-backend@3.0.0-beta.46 @trigger.dev/stripe@3.0.0-beta.46 @trigger.dev/react@3.0.0-beta.46 2024-07-04 14:09:46 +01:00
github-actions[bot] ad68a3cc05 chore: Update version for release (beta) (#1199)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-04 14:07:42 +01:00
nicktrn be58638904 Documentation edits made through Mintlify web editor 2024-07-04 13:34:30 +01:00
nicktrn 8f43aecacc Handle redis errors more gracefully 2024-07-04 11:43:11 +01:00
nicktrn 6fd7560d5c Add core timers export 2024-07-03 19:14:06 +01:00
nicktrn eb3b7b6f9e Fix logger import 2024-07-03 17:15:16 +01:00
nicktrn 7aed154854 Update pnpm setup action 2024-07-03 17:06:57 +01:00
Matt Aitken 50506dce9f Documentation edits made through Mintlify web editor 2024-07-03 16:58:57 +01:00
nicktrn d5772e57bd Remove rogue zod error 2024-07-03 16:57:13 +01:00