Commit Graph

4219 Commits

Author SHA1 Message Date
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
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
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 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
James Ritchie 5ea6a49d08 Made the app work very basically on mobile devices (#668)
* Removed the no-mobile blocker overlay so you can use the site on a phone

* Removed mobile dropdown from nav

* The app works on mobile at a width of 1024px
2023-10-20 16:12:17 +01:00
Matt Aitken dcd505e608 Transforming httpTrigger to the format we want 2023-10-20 15:45:52 +01:00
Matt Aitken 321ad6103b Import fixes 2023-10-20 15:25:19 +01:00
Matt Aitken 11c4a2ee5f Basic HttpTrigger 2023-10-20 15:24:39 +01:00
Matt Aitken 601bc56811 The logic for the httpTrigger is in the separate file, just call it from the client using defineHttpTrigger 2023-10-20 15:24:15 +01:00
Matt Aitken 229c06c338 Catalog reference that uses the httpTrigger 2023-10-20 15:23:38 +01:00
Matt Aitken c8b11df10e Need to define the class like EventTrigger 2023-10-20 15:11:21 +01:00
D-K-P dce5578327 Improved the GitHub overview copy 2023-10-20 14:35:28 +01:00
dhselar1423 fde3f17a25 fixed typos 2023-10-20 19:00:41 +05:30
Matt Aitken 1ad4fdc26b EventSpecificationExample now derived from schema 2023-10-20 14:27:50 +01:00
dhselar1423 a6c9cac26c slack docs 2023-10-20 18:30:03 +05:30
Matt Aitken da9fac2976 Use the RequestFilterSchema from core 2023-10-20 13:04:36 +01:00
Matt Aitken 0cd79fd83c RequestFilterSchema is part of core 2023-10-20 13:04:24 +01:00
D-K-P 34bb3acc23 Removed idempotencyKey line from GH tasks 2023-10-20 12:50:27 +01:00
Hemachandar 6d3b761cd7 fix: set correct next/prev cursors in run-list-presenter (#642)
* fix: set correct next/prev cursors in run-list-presenter

* set runs to return
2023-10-20 12:00:17 +01:00
Matt Aitken abc9737a4f Tabler icons added to NamedIcon
commit 13ed268f1d6732ef28c6e4a9eeb927c1af822032
Author: Matt Aitken <matt@mattaitken.com>
Date:   Fri Oct 20 11:38:22 2023 +0100

    Added all the tabler-icons to Storybook

commit 62738d71a40f17c45c0b29332359b2b670233a97
Author: Matt Aitken <matt@mattaitken.com>
Date:   Fri Oct 20 11:38:09 2023 +0100

    Use the no-stroke version of the tabler-sprite so we can control the stroke width

commit a1b7edd57f8b2d3f2a5f4d96cbc9eb0a887f3442
Author: Matt Aitken <matt@mattaitken.com>
Date:   Fri Oct 20 11:37:54 2023 +0100

    Set the default width to 1.5, so they’re a bit thinner

commit 69ba38802b849376611678537f7d8e248b60086b
Author: Matt Aitken <matt@mattaitken.com>
Date:   Fri Oct 20 10:55:34 2023 +0100

    Added a tabler icon to an events job catalog job

commit eb3c5f649d06adcc9ce0641f50e082ecdeead7a2
Author: Matt Aitken <matt@mattaitken.com>
Date:   Fri Oct 20 10:53:40 2023 +0100

    Moved the tabler sprite to the app and use an import. This means it’ll be cached and we can move it

commit c24d76e6df9233b001a0242f8806076562ca2e90
Author: Chaturved Degloorkar <48447253+chaturrved@users.noreply.github.com>
Date:   Fri Oct 20 15:22:59 2023 +0530

    feat: Add support for tabler-icons when using the icon for Tasks  (#629)

    * Add support for tabler-icons

    * Changed the core update type from minor to a patch

    ---------

    Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-10-20 11:41:45 +01:00
Bhargav Shirin Nalamati 84af64165c changed the title for contributors (#633) 2023-10-20 10:22:13 +01:00
Alexandre Costa 0adf41c7f0 Feat: add maxDuration setting for API/Trigger route in the CLI Init Command for Next.js (#617)
* add cli init maxDuration to the api/trigger route for nextjs

* refactor createTriggerRoute

* move boxen log to createTriggerRoute function

* refine detectNextVersion and versionNumberPattern regex to match the latest nextjs version

* add tests for the detectNextVersion function

* add changeset file

* If the regex doesn't match, it returns null instead of throwing

* Tweaked message about the max duration

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-10-20 10:16:44 +01:00
Dan b7f4e40edb Merge pull request #660 from Rutam21/TRI-1425
[TRI-1425] : Improve the Plain integration documentation.
2023-10-20 10:05:18 +01:00
Matt Aitken 81d55f94a0 Started defining the HttpTrigger class 2023-10-20 09:27:37 +01:00
Rutam21 cf33396dc0 [TRI-1425] Improve the Plain integration documentation 2023-10-20 02:45:46 +05:30
Dan 51f2cd6b3f Updated posthog to 1.83.0 (#608) 2023-10-19 16:34:41 +01:00
vimode 513d0f071d fix: broken links in documentation (#602)
* fix: broken links at what is triggerdev docs

* fix: broken links for apikey

* fix: broken sdk link

* fix: broken link in concepts/triggers

* fix: broken link for zod guide at concepts/triggers/events

* fix: broken links in title for projects

* Shouldn't have /docs at the start

* Use backgroundFetch path

---------

Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-10-19 16:27:21 +01:00
Hemachandar 50e3192453 feat: add ability to use custom tunnel in dev cmd (#597)
* feat: add ability to use custom tunnel in dev cmd

* Added a short flag -t for the tunnel flag

* skip framework url resolution if tunnel-url is provided

* remove type annotation

---------

Co-authored-by: Eric Allam <eric@trigger.dev>
Co-authored-by: Matt Aitken <matt@mattaitken.com>
2023-10-19 16:11:08 +01:00
Dan 1524c95a7a Merge pull request #650 from shelar1423/patch2
Get help icon and twitter text modifications
2023-10-19 12:46:41 +01:00
Eric Allam c8aaea8ad0 Improvements: Gracefully shutdown to prevent locked jobs (#648)
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 6s
🚀 Publish Trigger.dev Docker / units (push) Failing after 5s
🚀 Publish Trigger.dev Docker / e2e (push) Failing after 6s
🚀 Publish Trigger.dev Docker / publish (push) Has been skipped
* WIP

* Report ECS task info on startup and shutdown

* Fixed lifecycle name

* Re-add terminus

* Require the build dir when http server is disabled

* Remove unnecessary logs

* Implement graceful shutdown in ZodWorker

* Re-order some code

* Increase the keepAliveTimeout to 65 seconds to prevent LB 502 errors
v.docker.2.2.1
2023-10-19 11:18:19 +01:00
dhselar1423 cf7f25abcd fix 2023-10-19 08:08:53 +05:30