Skip to content

Commit 3189c4c

Browse files
authored
Merge branch 'main' into docs/realtime-docs-updates
2 parents f807f1a + 1feabd7 commit 3189c4c

File tree

88 files changed

+3406
-570
lines changed

Some content is hidden

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

88 files changed

+3406
-570
lines changed

.changeset/big-garlics-own.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@trigger.dev/sdk": patch
3+
---
4+
5+
fix: importing from runEngine/index.js breaks non-node runtimes

.changeset/cyan-news-design.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trigger.dev": patch
3+
---
4+
5+
Allow any runs to finish after SIGTERM but disable warm starts

.changeset/empty-dolls-judge.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trigger.dev": patch
3+
---
4+
5+
Switch to profile after successful login

.changeset/giant-plums-smash.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
"@trigger.dev/sdk": patch
3+
---
4+
5+
Added and cleaned up the run ctx param:
6+
7+
- New optional properties `ctx.run.parentTaskRunId` and `ctx.run.rootTaskRunId` reference the current run's root/parent ID.
8+
- Removed deprecated properties from `ctx`
9+
- Added a new `ctx.deployment` object that contains information about the deployment associated with the run.
10+
11+
We also update `metadata.root` and `metadata.parent` to work even when the run is a "root" run (meaning it doesn't have a parent or a root associated run). This now works:
12+
13+
```ts
14+
metadata.root.set("foo", "bar");
15+
metadata.parent.set("baz", 1);
16+
metadata.current().foo // "bar"
17+
metadata.current().baz // 1
18+
```

.changeset/rare-mails-fail.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+
Add Lightpanda extension

apps/webapp/app/components/billing/UpgradePrompt.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ export function UpgradePrompt() {
3030
<Icon icon={ExclamationCircleIcon} className="h-5 w-5 text-error" />
3131
<Paragraph variant="small" className="text-error">
3232
You have exceeded the monthly $
33-
{(plan.v3Subscription?.plan?.limits.includedUsage ?? 500) / 100} free credits. No runs
34-
will execute in Prod until{" "}
33+
{(plan.v3Subscription?.plan?.limits.includedUsage ?? 500) / 100} free credits. Existing
34+
runs will be queued and new runs won't be created until{" "}
3535
<DateTime date={nextMonth} includeTime={false} timeZone="utc" />, or you upgrade.
3636
</Paragraph>
3737
</div>

apps/webapp/app/components/navigation/OrganizationSettingsSideMenu.tsx

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {
2+
BellAlertIcon,
23
ChartBarIcon,
34
Cog8ToothIcon,
45
CreditCardIcon,
@@ -12,6 +13,7 @@ import {
1213
organizationSettingsPath,
1314
organizationTeamPath,
1415
rootPath,
16+
v3BillingAlertsPath,
1517
v3BillingPath,
1618
v3UsagePath,
1719
} from "~/utils/pathBuilder";
@@ -67,27 +69,34 @@ export function OrganizationSettingsSideMenu({
6769
<SideMenuHeader title="Organization" />
6870
</div>
6971
{isManagedCloud && (
70-
<SideMenuItem
71-
name="Usage"
72-
icon={ChartBarIcon}
73-
activeIconColor="text-indigo-500"
74-
to={v3UsagePath(organization)}
75-
data-action="usage"
76-
/>
77-
)}
78-
{isManagedCloud && (
79-
<SideMenuItem
80-
name="Billing"
81-
icon={CreditCardIcon}
82-
activeIconColor="text-emerald-500"
83-
to={v3BillingPath(organization)}
84-
data-action="billing"
85-
badge={
86-
currentPlan?.v3Subscription?.isPaying ? (
87-
<Badge variant="extra-small">{currentPlan?.v3Subscription?.plan?.title}</Badge>
88-
) : undefined
89-
}
90-
/>
72+
<>
73+
<SideMenuItem
74+
name="Usage"
75+
icon={ChartBarIcon}
76+
activeIconColor="text-indigo-500"
77+
to={v3UsagePath(organization)}
78+
data-action="usage"
79+
/>
80+
<SideMenuItem
81+
name="Billing"
82+
icon={CreditCardIcon}
83+
activeIconColor="text-emerald-500"
84+
to={v3BillingPath(organization)}
85+
data-action="billing"
86+
badge={
87+
currentPlan?.v3Subscription?.isPaying ? (
88+
<Badge variant="extra-small">{currentPlan?.v3Subscription?.plan?.title}</Badge>
89+
) : undefined
90+
}
91+
/>
92+
<SideMenuItem
93+
name="Billing alerts"
94+
icon={BellAlertIcon}
95+
activeIconColor="text-rose-500"
96+
to={v3BillingAlertsPath(organization)}
97+
data-action="billing-alerts"
98+
/>
99+
</>
91100
)}
92101
<SideMenuItem
93102
name="Team"

apps/webapp/app/components/primitives/Input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const containerBase =
77
"has-[:focus-visible]:outline-none has-[:focus-visible]:ring-1 has-[:focus-visible]:ring-charcoal-650 has-[:focus-visible]:ring-offset-0 has-[:focus]:border-ring has-[:focus]:outline-none has-[:focus]:ring-1 has-[:focus]:ring-ring has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50 ring-offset-background transition cursor-text";
88

99
const inputBase =
10-
"h-full w-full text-text-bright bg-transparent file:border-0 file:bg-transparent file:text-base file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-0 disabled:cursor-not-allowed outline-none ring-0 border-none";
10+
"h-full w-full text-text-bright bg-transparent file:border-0 file:bg-transparent file:text-base file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-0 disabled:cursor-not-allowed outline-none ring-0 border-none [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:m-0 [&::-webkit-inner-spin-button]:m-0 [&]:[-moz-appearance:textfield]";
1111

1212
const variants = {
1313
large: {

apps/webapp/app/env.server.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,12 @@ const EnvironmentSchema = z.object({
252252
EVENTS_BATCH_SIZE: z.coerce.number().int().default(100),
253253
EVENTS_BATCH_INTERVAL: z.coerce.number().int().default(1000),
254254
EVENTS_DEFAULT_LOG_RETENTION: z.coerce.number().int().default(7),
255+
EVENTS_MIN_CONCURRENCY: z.coerce.number().int().default(1),
256+
EVENTS_MAX_CONCURRENCY: z.coerce.number().int().default(10),
257+
EVENTS_MAX_BATCH_SIZE: z.coerce.number().int().default(500),
258+
EVENTS_MEMORY_PRESSURE_THRESHOLD: z.coerce.number().int().default(5000),
259+
EVENTS_LOAD_SHEDDING_THRESHOLD: z.coerce.number().int().default(100000),
260+
EVENTS_LOAD_SHEDDING_ENABLED: z.string().default("1"),
255261
SHARED_QUEUE_CONSUMER_POOL_SIZE: z.coerce.number().int().default(10),
256262
SHARED_QUEUE_CONSUMER_INTERVAL_MS: z.coerce.number().int().default(100),
257263
SHARED_QUEUE_CONSUMER_NEXT_TICK_INTERVAL_MS: z.coerce.number().int().default(100),
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import { Prisma } from "~/db.server";
2+
3+
export function scheduleUniqWhereClause(
4+
projectId: string,
5+
scheduleId: string
6+
): Prisma.TaskScheduleWhereUniqueInput {
7+
if (scheduleId.startsWith("sched_")) {
8+
return {
9+
friendlyId: scheduleId,
10+
projectId,
11+
};
12+
}
13+
14+
return {
15+
projectId_deduplicationKey: {
16+
projectId,
17+
deduplicationKey: scheduleId,
18+
},
19+
};
20+
}
21+
22+
export function scheduleWhereClause(
23+
projectId: string,
24+
scheduleId: string
25+
): Prisma.TaskScheduleWhereInput {
26+
if (scheduleId.startsWith("sched_")) {
27+
return {
28+
friendlyId: scheduleId,
29+
projectId,
30+
};
31+
}
32+
33+
return {
34+
projectId,
35+
deduplicationKey: scheduleId,
36+
};
37+
}

0 commit comments

Comments
 (0)