Skip to content

Commit f508bf5

Browse files
Merge branch 'main' into Update-flattenAttributes
2 parents 6915d9e + a790759 commit f508bf5

File tree

201 files changed

+9991
-2256
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+9991
-2256
lines changed

.changeset/brave-forks-compare.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@trigger.dev/react-hooks": minor
3+
"@trigger.dev/sdk": minor
4+
"@trigger.dev/core": minor
5+
---
6+
7+
Access run status updates in realtime, from your server or from your frontend

.changeset/good-ligers-sit.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@trigger.dev/build": patch
3+
---
4+
5+
Added a Vercel sync env vars extension. Given a Vercel projectId and access token it will sync Vercel env vars when deploying Trigger.dev tasks.

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ concurrency:
1717
jobs:
1818
release:
1919
name: 🦋 Changesets Release
20-
runs-on: buildjet-8vcpu-ubuntu-2204
20+
runs-on: ubuntu-latest
2121
if: github.repository == 'triggerdotdev/trigger.dev'
2222
outputs:
2323
published: ${{ steps.changesets.outputs.published }}

.github/workflows/unit-tests.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
jobs:
77
unitTests:
88
name: "🧪 Unit Tests"
9-
runs-on: buildjet-8vcpu-ubuntu-2204
9+
runs-on: buildjet-16vcpu-ubuntu-2204
1010
steps:
1111
- name: ⬇️ Checkout repo
1212
uses: actions/checkout@v4
@@ -30,5 +30,17 @@ jobs:
3030
- name: 📀 Generate Prisma Client
3131
run: pnpm run generate
3232

33-
- name: 🧪 Run Unit Tests
34-
run: pnpm run test
33+
- name: 🧪 Run Webapp Unit Tests
34+
run: pnpm run test --filter webapp
35+
env:
36+
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres
37+
DIRECT_URL: postgresql://postgres:postgres@localhost:5432/postgres
38+
SESSION_SECRET: "secret"
39+
MAGIC_LINK_SECRET: "secret"
40+
ENCRYPTION_KEY: "secret"
41+
42+
- name: 🧪 Run Package Unit Tests
43+
run: pnpm run test --filter "@trigger.dev/*"
44+
45+
- name: 🧪 Run Internal Unit Tests
46+
run: pnpm run test --filter "@internal/*"

.npmrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
link-workspace-packages=false
2-
public-hoist-pattern[]=*prisma*
2+
public-hoist-pattern[]=*prisma*
3+
prefer-workspace-packages=true

.vscode/extensions.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
{
2-
"recommendations": [
3-
"denoland.vscode-deno"
4-
],
5-
"unwantedRecommendations": [
6-
7-
]
2+
"recommendations": ["bierner.comment-tagged-templates"],
3+
"unwantedRecommendations": []
84
}

README.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,20 @@
1515

1616
## About Trigger.dev
1717

18-
Trigger.dev is an open source platform and SDK which allows you to create long-running background jobs with no timeouts. Write normal async code, deploy, and never hit a timeout.
18+
Trigger.dev is an open source platform and SDK which allows you to create long-running background jobs. Write normal async code, deploy, and never hit a timeout.
1919

20-
#### Features:
20+
### Key features:
2121

2222
- JavaScript and TypeScript SDK
2323
- Write reliable code by default
24+
- No timeouts
25+
- Retries (with exponential backoff)
26+
- Queues and concurrency controls
27+
- Schedules and crons
28+
- Full Observability; logs, live trace views, advanced filtering
29+
- Custom alerts, get notified by email, Slack or webhooks
2430
- No infrastructure to manage
31+
- Elastic (scaling)
2532
- Works with your existing tech stack
2633

2734
## In your codebase
@@ -45,7 +52,7 @@ export const helloWorld = task({
4552

4653
## Deployment
4754

48-
Use our SDK to write tasks in your codebase. There's no infrastructure to manage, your tasks automatically scale and connect to our cloud. Or you can always [self-host](https://trigger.dev/docs/v3/open-source-self-hosting#overview).
55+
Use our SDK to write tasks in your codebase. There's no infrastructure to manage, your tasks automatically scale and connect to our cloud. Or you can always self-host.
4956

5057
## Environments
5158

@@ -59,11 +66,19 @@ View every task in every run so you can tell exactly what happened. We provide a
5966

6067
# Getting started
6168

62-
Visit our docs [here](https://trigger.dev/docs/v3/introduction) for a full guide on how to get started with Trigger.dev.
69+
The quickest way to get started is to create an account and project in our [web app](https://cloud.trigger.dev), and follow the instructions in the onboarding. Build and deploy your first task in minutes.
6370

64-
## Self-host
71+
### Useful links:
6572

66-
If you prefer to self-host, you can follow our [self-hosting guide](https://trigger.dev/docs/v3/open-source-self-hosting#overview).
73+
- [Quick start](https://trigger.dev/docs/quick-start) - get up and running in minutes
74+
- [How it works](https://trigger.dev/docs/v3/how-it-works) - understand how Trigger.dev works under the hood
75+
- [Guides and examples](https://trigger.dev/docs/guides/introduction) - walk-through guides and code examples for popular frameworks and use cases
76+
77+
## Self-hosting
78+
79+
If you prefer to self-host Trigger.dev, you can follow our [self-hosting guide](https://trigger.dev/docs/v3/open-source-self-hosting#overview).
80+
81+
We also have a dedicated self-hosting channel in our [Discord server](https://trigger.dev/discord) for support.
6782

6883
## Development
6984

apps/coordinator/src/checkpointer.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,10 @@ export class Checkpointer {
436436
this.#logger.error("Error during cleanup", { ...metadata, error });
437437
}
438438

439-
this.#abortControllers.delete(runId);
439+
// Ensure only the current controller is removed
440+
if (this.#abortControllers.get(runId) === controller) {
441+
this.#abortControllers.delete(runId);
442+
}
440443
controller.signal.removeEventListener("abort", onAbort);
441444
};
442445

apps/coordinator/src/exec.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,18 @@ export class Exec {
6464
command,
6565
argsRaw: args,
6666
argsTrimmed,
67-
...output,
67+
globalOpts: {
68+
trimArgs: this.trimArgs,
69+
neverThrow: this.neverThrow,
70+
hasAbortSignal: !!this.abortSignal,
71+
},
72+
localOpts: opts,
73+
stdout: output.stdout,
74+
stderr: output.stderr,
75+
pid: result.pid,
76+
exitCode: result.exitCode,
77+
aborted: result.aborted,
78+
killed: result.killed,
6879
};
6980

7081
if (this.logOutput) {

0 commit comments

Comments
 (0)