Commit Graph

3119 Commits

Author SHA1 Message Date
nicktrn 2ce630072c Merge branch 'main' into v3/infra-updates
🚢 Publish Infra Images / build (coordinator) (push) Has been cancelled
🚢 Publish Infra Images / build (kubernetes-provider) (push) Has been cancelled
2024-03-25 19:00:26 +00:00
nicktrn 671dff6d6f add secure flag to zod connection 2024-03-25 18:59:05 +00:00
Eric Allam 395abe1b92 v3: Various fixes to support papermark use-case (#970)
* Adding a changeset for v3

* Add a version field to @trigger.dev/core-apps package.json

* Build trigger.dev when doing a prerelease

* bundle @trigger.dev/core-apps with trigger.dev cli

* Fix the init command config template

* Don’t use * for the @trigger.dev/core dep version specifier

* strip workspace: from the package version before installing it

* Added dependenciesToBundle config option to bundle ESM only packages

* Added logging around resolving dependency paths

* Try again

* Resolve dependencies based on the project dir first

* flip the bundled default

* Adding some logs around dev task completion notifications

* Adding some additional logs

* Add more logs

* Write out the log using process.stdout

* Store pending completion notifications and resume them when awaited (fixes race condition)

* Cleanup some of the logs

* Copy over the postinstall step from the projects package.json

* Add support for including additional files when deploying (e.g. prisma schema)

* Don’t run scripts when resolving deps

* copy all the files just in case anything is needed in postinstall

* Remove duplicate option

* Use the tag when outputting the dev command

* Remove the postinstall script

* add the trigger dir to the config if the default is not chosen

* Remove the “hud” display in the dev command

* trigger file names with dashes now work

* Better file watching in dev

* Much better duplicate ID experience now

* Much better “Project not found” error

* Export the handleError function types from sdk

* Add support for configuring instrumentation

* Upgrade and unify @opentelemetry/* packages (and remove storybook from the webapp)

* Fix typescript error in react package

* Upgrade react types in webapp

* Allow span icons to be determined based on the span name (e.g. prisma:)

* Ignore built-in env vars when checking for env vars, and allow continuing the deployment even if missing env vars were detected

* Improve the retry.fetch default behavior and option structure

* Fixed typescript errors with packages/email react types

* Update the retry.fetch docs
2024-03-25 17:02:49 +00:00
Matt Aitken b35eebb666 Rate limit API requests and changed SQS reading speed (#969)
* Trying to use the @upstash/ratelimit package with ioredis…

* WIP using the redis package instead

* Revert the action back

* Removed redis

* Started refactoring

* SQS setting for the poll interval. Set the default queue reading to be slower

* API rate limiter as Express middleware

* Organise imports

* Fixed spelling mistake “limitter”

* No authorization header response is problem+json
2024-03-25 16:39:20 +00:00
nicktrn 9ecf07731a v3: small features and fixes for prod infra (#968)
* add checkpoint restore events

* fix retries.enabledInDev

* fix tsconfig paths

* fix provider build and dev

* update kubernetes provider and fix builds again

* upgrade prod base to node 20

* update infra publish workflow

* rethrow k8s errors after logging

* shorten index container names

* fix error type assertion

* rename type assertion

* remove resource limits for now

* add missing run id on create

* add push to deploy command for self-hosting

* checkpointing fixes

* update coordinator image

* ensure valid registry login

* delete checkpoint archive after successful push

* log options on error

* structured logs for socket connections

* fix structured log merge

* exit process after checkpointing

* update restore pull secret name

* append shortcode to restore names

* log handler payload

* disable post start lifecycle hook

* pass in coordinator host via volume

* replace dapi with taskinfo

* add missing restore label

* don't restart restored containers

* remove init container from create

* atomic post-completion checkpoints

* switch to run id for container names

* improve wait accuracy

* measure basic checkpoint perf

* always log disconnect reason

* use system clock to end wait spans

* checkpoint readiness and cancel signals

* restore from checkpoint events and fix statuses

* remove attempt id env var

* restore dependencies from events

* reconnect wip

* lifecycle hooks are back

* fix hooks and improve reconnect

* make docker send postStart hook

* only checkpoint for retry if large delay

* fix a few more resume issues

* lifecycle hook fixes

* skip connection handler when waiting for post start hook

---------

Co-authored-by: Eric Allam <eric@trigger.dev>
2024-03-25 16:28:56 +00:00
Matt Aitken b890a64046 The in-progress stripes are much more subtle 2024-03-25 16:20:51 +00:00
nicktrn fb9e63bab5 Merge branch 'main' into v3/infra-updates 2024-03-25 12:12:15 +00:00
nicktrn ad2d6d2f1e lifecycle hook fixes 2024-03-25 12:11:16 +00:00
Matt Aitken 4266b308e7 Link from trigger() to a run. Link back to the triggering run. (#967)
* Schema for SpanMessagingEvents

* RunFilters status map was missing the key

* Link from a trigger to the run

* Two-way links working
2024-03-25 11:28:35 +00:00
Matt Aitken 67c62f7d25 v3 is restricted to approved orgs (#965)
* v3 projects can only be created if the org has permissions to do it

* Admin page

* Removed unused classes

* Admin org page, with links between user and org pages

* Set v3 enabled or not
2024-03-25 11:28:21 +00:00
nicktrn 26439105a9 fix a few more resume issues 2024-03-24 22:16:01 +00:00
nicktrn 9c586759a6 only checkpoint for retry if large delay 2024-03-23 23:29:39 +00:00
nicktrn 3ef4949270 make docker send postStart hook 2024-03-23 23:26:34 +00:00
nicktrn fe38d12661 fix hooks and improve reconnect 2024-03-23 11:17:38 +00:00
nicktrn b8d0663d0d Merge branch 'main' into v3/infra-updates 2024-03-22 22:09:29 +00:00
nicktrn 6a93aefa55 lifecycle hooks are back 2024-03-22 22:01:48 +00:00
Matt Aitken c6d6a9191c Hide show.actions from the properties panel (#964) 2024-03-22 19:53:28 +00:00
nicktrn 6ababeae55 restore dependencies from events 2024-03-22 18:54:07 +00:00
nicktrn 30c74f3c4b remove attempt id env var 2024-03-22 15:38:32 +00:00
Kritik Jiyaviya a49b659701 feat: Ability to revoke an invite to an org (#902)
* feat: Ability to revoke an invite to an org

* Resolve a conflict with main

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-03-22 14:35:49 +00:00
nicktrn 0683ecaf39 restore from checkpoint events and fix statuses 2024-03-22 14:25:30 +00:00
nicktrn b017af4e6d checkpoint readiness and cancel signals 2024-03-22 08:41:31 +00:00
nicktrn cbc84e2011 measure basic checkpoint perf 2024-03-21 18:36:12 +00:00
nicktrn e2b10f42a0 improve wait accuracy 2024-03-21 16:10:22 +00:00
nicktrn 9fc62f7f10 switch to run id for container names 2024-03-21 14:56:23 +00:00
nicktrn 5180aacd4a atomic post-completion checkpoints 2024-03-21 14:14:46 +00:00
nicktrn 001bd97b63 remove init container from create 2024-03-21 11:21:37 +00:00
nicktrn 5017a8a808 don't restart restored containers 2024-03-21 11:20:34 +00:00
nicktrn d5b1bcac58 add missing restore label 2024-03-21 10:34:10 +00:00
nicktrn 0f6ea0b262 replace dapi with taskinfo 2024-03-21 10:07:12 +00:00
nicktrn e0507a9598 pass in coordinator host via volume 2024-03-20 21:56:44 +00:00
nicktrn 27ad6574c3 disable post start lifecycle hook 2024-03-20 19:18:46 +00:00
nicktrn a4209dac25 Merge branch 'main' into v3/infra-updates 2024-03-20 17:30:44 +00:00
nicktrn b091347614 append shortcode to restore names 2024-03-20 15:15:51 +00:00
nicktrn f21c94c0ce update restore pull secret name 2024-03-20 15:13:03 +00:00
nicktrn 18bd7f4623 exit process after checkpointing 2024-03-20 14:38:21 +00:00
Eric Allam 737ff9928c When cancelling a run in the UI make sure the task run status is cancelled not interrupted 2024-03-20 13:22:50 +00:00
nicktrn 961fb3219e Merge branch 'main' into v3/infra-updates 2024-03-20 13:20:51 +00:00
nicktrn 8fda3d7b36 structured logs for socket connections 2024-03-20 13:17:41 +00:00
Eric Allam fc4b95d69e A bunch of deployment fixes (#960)
- Time out deployments to prevent never-ending building/deploying
- Use the CURRENT worker deployment when determining which version to execute
- Fix some of the deployment error handling logic
2024-03-20 13:15:48 +00:00
James Ritchie 6c546936f3 Improved v3 feedback button (#959)
* Removed feedback button from PageHeader

* Show a different feedback button in the side menu for v3 projects

* Fixed issue with button wrapping on smaller width browser
2024-03-20 12:16:20 +00:00
nicktrn c734db3951 log options on error 2024-03-20 10:05:03 +00:00
nicktrn 8ca21c1dd4 delete checkpoint archive after successful push 2024-03-20 10:00:15 +00:00
nicktrn fdcb06a173 ensure valid registry login 2024-03-20 09:54:54 +00:00
nicktrn 6c0f8436ce update coordinator image 2024-03-19 22:24:32 +00:00
James Ritchie 08e4fc002f V3 UI improvements (#958)
* Adding a v3 feedback button top-right

* Changed paused to frozen for attempts

* Reordered and renamed run statuses

* Dropdown status menu shows tool tips on hover

* Added a new DP feedback button in the header

* Created a more useful feedback sheet

* Added loading bar animation to storybook

* Switch the integration page to point at the “feature” help instead of “integration” which has been removed

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2024-03-19 20:36:04 +00:00
nicktrn a320f17bc4 Merge branch 'main' into v3/infra-updates 2024-03-19 19:22:27 +00:00
nicktrn 5ff738a18c checkpointing fixes 2024-03-19 19:21:12 +00:00
nicktrn d39aca8820 add missing run id on create 2024-03-19 15:45:42 +00:00
Matt Aitken 2e56af9742 Tasks page live-reloads with new tasks (#957)
* DevPubSub: use the schema that’s already been defined

* Publish a message to projectPubSub when a new DEV worker is created

* Live reloading of the tasks table (for dev tasks)

* Live notifications for deployed workers as well as local workers
2024-03-19 15:42:57 +00:00