Commit Graph

4248 Commits

Author SHA1 Message Date
Matt Aitken dabbd72f54 Merge remote-tracking branch 'origin/main' into feat/triggers-v2
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 4s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 20s
🚀 Publish Trigger.dev Docker / units (push) Failing after 19s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
v.docker.2.2.3
2023-10-24 18:11:14 +01:00
Matt Aitken 237545754f Indexing errors weren’t being serialized to JSON properly in some cases, so the errors weren’t getting inserted
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 1s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 0s
🚀 Publish Trigger.dev Docker / units (push) Failing after 21s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
v.docker.2.2.4
2023-10-24 18:08:46 +01:00
Eric Allam d7c1e98e5e Update pnpm lock @trigger.dev/airtable@2.2.2 @trigger.dev/astro@2.2.2 @trigger.dev/cli@2.2.2 @trigger.dev/core@2.2.2 @trigger.dev/eslint-plugin@2.2.2 @trigger.dev/express@2.2.2 @trigger.dev/github@2.2.2 @trigger.dev/integration-kit@2.2.2 @trigger.dev/linear@2.2.2 @trigger.dev/nestjs@2.2.2 @trigger.dev/nextjs@2.2.2 @trigger.dev/openai@2.2.2 @trigger.dev/plain@2.2.2 @trigger.dev/react@2.2.2 @trigger.dev/remix@2.2.2 @trigger.dev/replicate@2.2.2 @trigger.dev/resend@2.2.2 @trigger.dev/sdk@2.2.2 @trigger.dev/sendgrid@2.2.2 @trigger.dev/slack@2.2.2 @trigger.dev/stripe@2.2.2 @trigger.dev/supabase@2.2.2 @trigger.dev/sveltekit@2.2.2 @trigger.dev/testing@2.2.2 @trigger.dev/typeform@2.2.2 2023-10-24 17:49:39 +01:00
github-actions[bot] 71a0afeb8d chore: Update version for release (#684)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-24 17:49:06 +01:00
Eric Allam 36a390449a @trigger.dev/openai: Upgrade to openai-node SDK 4.13.0, add support for request options and defaultQuery/defaultHeaders 2023-10-24 17:45:43 +01:00
James Ritchie 375e495423 Fixed accounts table not scrolling in the admin area 2023-10-24 17:34:33 +01:00
D-K-P 866c20cd39 Updated the Slack underlying client example 2023-10-24 16:26:14 +01:00
Matt Aitken 5a65d65baa Migration to add shortcode to RuntimeEnvironment 2023-10-24 13:43:01 +01:00
Eric Allam 408785b8ef Update pnpm lock file @trigger.dev/airtable@2.2.1 @trigger.dev/astro@2.2.1 @trigger.dev/cli@2.2.1 @trigger.dev/core@2.2.1 @trigger.dev/express@2.2.1 @trigger.dev/github@2.2.1 @trigger.dev/integration-kit@2.2.1 @trigger.dev/linear@2.2.1 @trigger.dev/nestjs@2.2.1 @trigger.dev/nextjs@2.2.1 @trigger.dev/openai@2.2.1 @trigger.dev/plain@2.2.1 @trigger.dev/react@2.2.1 @trigger.dev/remix@2.2.1 @trigger.dev/replicate@2.2.1 @trigger.dev/resend@2.2.1 @trigger.dev/sdk@2.2.1 @trigger.dev/sendgrid@2.2.1 @trigger.dev/slack@2.2.1 @trigger.dev/stripe@2.2.1 @trigger.dev/supabase@2.2.1 @trigger.dev/sveltekit@2.2.1 @trigger.dev/testing@2.2.1 @trigger.dev/typeform@2.2.1 @trigger.dev/eslint-plugin@2.2.1 2023-10-24 13:41:35 +01:00
github-actions[bot] f982e00997 chore: Update version for release (#618)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-24 13:40:57 +01:00
Matt Aitken d1b4057f8d Initial server side work 2023-10-24 13:26:25 +01:00
Matt Aitken 734624371b Initial TriggerHttpEndpoint migrations 2023-10-24 13:26:00 +01:00
Eric Allam 7e100b8362 ignore: adding more logs to perform task operation
🚀 Publish Trigger.dev Docker / units (push) Failing after 0s
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 5s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 6s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
v.docker.2.2.2
2023-10-24 12:14:52 +01:00
Eric Allam ea052c44c7 ignore: Add durationinMs to log 2023-10-24 11:38:35 +01:00
D-K-P 76224568f4 Airtable copy updates 2023-10-24 11:31:01 +01:00
Dan 72e67981b0 Merge pull request #666 from shelar1423/patch-3
Improved the Airtable integration documentation
2023-10-24 11:08:03 +01:00
Eric Allam cc44aff24b Added some docs about using the OpenAI integration as a universal client 2023-10-24 09:35:20 +01:00
Eric Allam 07d28ee4f5 Add custom baseURL and idempotency key support to OpenAI integration (#682)
This commit introduces the ability to set custom base URLs, which allows for the use of different APIs such as Perplexity. It also ensures that any OpenAI-related task now includes an idempotency key when making requests. Works for background tasks as well.
2023-10-24 09:19:38 +01:00
D-K-P f16a2cc4e6 Added link to the api reference repo to the readme 2023-10-24 09:11:57 +01:00
D-K-P b859837564 Edited the OpenAI ovrerview and added correct links for the tasks 2023-10-23 17:19:19 +01:00
Dan 1343003efa Merge pull request #673 from Rutam21/TRI-1430
[TRI-1430] : Improve the OpenAI integration documentation
2023-10-23 16:58:22 +01:00
Eric Allam 0c4aea0338 Add execution duration for background fetch 2023-10-23 16:55:00 +01:00
Matt Aitken 108d34843e Merge remote-tracking branch 'origin/main' into feat/triggers-v2 2023-10-23 15:48:49 +01:00
Matt Aitken 5063bd133a The payload from an HTTPEndpoint is now a Request 2023-10-23 15:44:54 +01:00
Matt Aitken 42c92d0e5b Added PayloadType to EventRecord. Default is JSON. 2023-10-23 15:44:17 +01:00
Matt Aitken 15418c2923 Removed the new TriggerMetadata for now, http will use static 2023-10-23 15:39:33 +01:00
Eric Allam 627c767c64 fix: fix trigger sources getting repeatedly registered
Fixes a bug where trigger sources would get re-registered on every index, no matter if they were already properly registered or not. This was causing a lot of extra “internal” runs and being overly chatty with client endpoints
2023-10-23 15:24:35 +01:00
Matt Aitken 3a1d92ed0b Started working on registration of the httpEndpoints 2023-10-23 14:49:57 +01:00
Matt Aitken 6cd7518720 Created HttpEndpoint as a top-level concept, it produces triggers using onRequest 2023-10-23 14:40:24 +01:00
Matt Aitken 504733e35c Renamed hostname to source 2023-10-23 13:44:30 +01:00
Digvijay Shelar f3a0c3a5d1 Merge branch 'main' into patch-3 2023-10-23 17:00:57 +05:30
dhselar1423 7bca3d9c15 made suggested changes 2023-10-23 16:57:52 +05:30
D-K-P 01fc1c6634 Slack integration docs copy updates 2023-10-23 12:17:29 +01:00
Matt Aitken 54d3843448 HttpEndpoin that isn’t a trigger 2023-10-23 12:17:18 +01:00
Dan 2d4f85e9f4 Merge pull request #667 from shelar1423/patch-4
Improved the Slack integration documentation
2023-10-23 12:08:40 +01:00
Matt Aitken f7b22eb5b0 Renamed some stuff 2023-10-23 12:07:31 +01:00
Rutam21 8718b28949 [TRI-1430] : Improve the OpenAI integration documentation 2023-10-21 04:55:12 +05:30
Matt Aitken dd0de9de17 Use new security function for verifying 2023-10-20 23:04:25 +01:00
Matt Aitken 5fd7b03986 Rejigged some things to support verifying payloads 2023-10-20 20:08:38 +01:00
Matt Aitken e6c4a4cbce Added some notes 2023-10-20 18:54:22 +01:00
dhselar1423 2caa2a5bbd Merge branch 'patch-4' of https://github.com/shelar1423/trigger.dev into patch-4 2023-10-20 23:14:43 +05:30
dhselar1423 43a10ee695 slack fixes 2023-10-20 23:11:41 +05:30
Matt Aitken 64306f653b Added HTTP generic type 2023-10-20 18:12:19 +01:00
Digvijay Shelar 018005d478 Merge branch 'main' into patch-4 2023-10-20 22:33:54 +05:30
dhselar1423 4da187c4c5 Merge branch 'patch-3' of https://github.com/shelar1423/trigger.dev into patch-3 2023-10-20 22:33:15 +05:30
dhselar1423 4925424778 Oauth and overview modifications 2023-10-20 22:32:48 +05:30
dhselar1423 7ef61222ed slack editing 2023-10-20 22:26:38 +05:30
Eric Allam 044d38e390 Improvement: Auto Execution Yielding (#612)
* Auto-yield run execution to help prevent duplicate task executions

* Add auto-yield config to endpoints

* Refactor run execution with buffer and limits

Introduced constants RUN_CHUNK_EXECUTION_BUFFER and MAX_RUN_CHUNK_EXECUTION_LIMIT. Adjusted PerformRunExecutionV2Service to use the new constants to fine-tune execution timings and buffers.

* Add endpoint probing functionality

Added new `RESPONSE_TIMEOUT_STATUS_CODES` in `consts.ts` to manage timeout responses. Additional functions `detectResponseIsTimeout(response: Response)` was added in `endpoint.server.ts` to detect if a response was a timeout based on the status codes from `RESPONSE_TIMEOUT_STATUS_CODES`.

Update actions to use new endpoint probing endpoint service. This allows for the early probing of endpoints to determine if they're up and running.

A new class `ProbeEndpointService` was created in `probeEndpoint.server.ts` which makes HTTP requests to a given endpoint and updates its properties based on the result.

Finally, `detectResponseIsTimeout(response)` is used in `performRunExecutionV2.server.ts` for marking the execution as succeeded when facing a timeout.

* Refactored probe method in EndpointApi class

The probe method of the EndpointApi class has been refactored to remove the error handling part and it now takes a timeout sent from the client directly. The corresponding changes were also made in the ProbeEndpointService and TriggerClient objects to reflect the alterations in the probe method.

The error handling related to the timeout has been removed and the responsibility of handling the timeout has been shifted to the client. Thus, the probe method has been greatly simplified. The `probeEndpoint.server.ts` file was also changed to accommodate the change in behavior of the probe result.

In the `triggerClient.ts` the timeout for probe is now read from the incoming request object. For backward compatibility, if no timeout is provided in the request, the default value of 15 minutes is used.

* Remove performRunExecution v1 enqueue function
* Better document limits and add docs on increasing function timeouts
* Upgrade webapp docker container to use 18.18.2
* force clients to yield when a run is executing in a gracefully shutting down worker
* Renamed task `key` to `cacheKey` and added more task documentation
* Index the `@trigger.dev/sdk` version on Endpoints
2023-10-20 17:44:10 +01:00
James Ritchie e7768881af Admin page now full screen with now extra UI 2023-10-20 16:53:04 +01:00
Matt Aitken 3fb476a8ff Initial httpTrigger types working 2023-10-20 16:52:16 +01:00